title: Proper usage of volatile sig_atomic_t
body: <p>According to <a href="https://wiki.sei.cmu.edu/confluence/display/c/SIG31-C.+Do+not+access+shared+objects+in+signal+handlers" rel="nofollow noreferrer">this</a> site, one can use variables of type <code>volatile sig_atomic_t</code> inside a signal handler. Now my question is, would for example something like the following code still be atomic and thus introduce no race conditions? </p>
  
  <p>Assume that we are using a multicore processor (<strong>EDIT</strong>: running a multithreaded program). Does <code>volatile sig_atomic_t</code> even work for multicore systems in the first place or should we use the <code>atomic&lt;unsigned int&gt;</code> of C++11 for signal handlers on a multicore system (<strong>EDIT</strong>: running a multithreaded program)?</p>
  
  <pre><code>volatile sig_atomic_t a;
  
  static void signal_handler(int sig, siginfo_t *si, void *unused)
  {
    int b;
    ................
    b = ...;
    a = a | b;
    ................
  }
  </code></pre>