Print

Print


C++11 does not guarantee that loads / stores are atomic for any
variable.  Using C++11, we force atomicity for the log level - but do not
provide any guarantee about ordering or visibility.

Without this, setting and getting the log level results in undefined
behavior.  Undefined behavior results in illegal C++11.

On any known processor and platform, this should be a no-op; however, the
code is now conforming C++11.
You can merge this Pull Request by running:

  git pull https://github.com/bbockelm/xrootd fix-logging-loads

Or you can view, comment on it, or merge it online at:

  https://github.com/xrootd/xrootd/pull/169

-- Commit Summary --

  * Use C++11 atomics to avoid undefined behavior.

-- File Changes --

    M src/XrdCl/XrdClLog.hh (41)

-- Patch Links --

https://github.com/xrootd/xrootd/pull/169.patch
https://github.com/xrootd/xrootd/pull/169.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/xrootd/xrootd/pull/169

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1