<h3>Contribution description</h3>
<p>This PR marks all pointers in the atomic utils API as <code>volatile</code> for the following reasons:</p>
<ol>
<li>The guarantees provided by <code>volatile</code> is a subset of the guarantees provided by the atomic utils. This makes this fact more obvious.</li>
<li>Casting <code>volatile</code> off is undefined behavior. In order to be able to use the atomic utils on memory mapped IO (which needs the <code>volatile</code> qualifier) without resorting to undefined behavior, this API change is needed.</li>
</ol>
<h3>Testing procedure</h3>
<p>No changes in binaries.</p>
<h3>Issues/PRs references</h3>
<p>Needed for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="707985165" data-permission-text="Title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/15074" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/15074/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/15074">#15074</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/15465'>https://github.com/RIOT-OS/RIOT/pull/15465</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>sys/atomic_utils: Use volatile pointers</li>
  <li>cpu/*/atomic_utils_arch.h: Add volatile qualifier</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-c9af5447d8516a3bfc0a7e400826079f65b5b6d8ed76bf10b7b9edcc7bda9374">cpu/arm7_common/include/atomic_utils_arch.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-39acaaf5d9b0ef8e0bcbc17ec969191d796fe3460fe1f6c29450476612cae273">cpu/atmega_common/include/atomic_utils_arch.h</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-fb0d0d7d8a287ff62edde9ddfc82d593ade27320820f1f612d15dfd1a4010412">cpu/cortexm_common/include/atomic_utils_arch.h</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-c50597d882f8e2ee5e35623c692b9f6528990cc58d55b09dfca15037f5e60eba">cpu/esp_common/include/atomic_utils_arch.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-1a37d769bd99c2241b8767b5d49ea00076a57c8c387f1901d86efffc83a7e0b3">cpu/fe310/include/atomic_utils_arch.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-0e46dd52dcbbb86acbcacd61c929253485386eab1c1cef900ec0b541d7ec16d2">cpu/mips32r2_common/include/atomic_utils_arch.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-99e9a38a074092c8353063497a11062e75fff9a27c3c4a5c48d23752c89a10ac">cpu/msp430_common/include/atomic_utils_arch.h</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-50c0b76fccf33810f7792f5083565dd41e15d95f43f607045ad23bbaac8794e9">cpu/native/include/atomic_utils_arch.h</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15465/files#diff-ea0255fac17aac5fe38f3c98c78417bbcc060809412fbe6242bf4c3326027344">sys/include/atomic_utils.h</a>
    (338)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/15465.patch'>https://github.com/RIOT-OS/RIOT/pull/15465.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/15465.diff'>https://github.com/RIOT-OS/RIOT/pull/15465.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/15465">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYGAH47SPTA5BYH5DNLSQOKPZANCNFSM4TZXRX5Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYAC2RQY4ZKG5FZLIC3SQOKPZA5CNFSM4TZXRX52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4LDPQTJQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/15465",
"url": "https://github.com/RIOT-OS/RIOT/pull/15465",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>