The wakePend flag currently has undefined behavior as multiple threads
read and write to it without a consistent locking mechanism. This
switches writes and reads to use C++11's release-consume ordering
when available. Without this patch, we have undefined behavior - which
is illegal with C++11.
The release-consume ordering is sufficient to guarantee atomicity
and the ordering of wakePend writes; other than that, it's a very
weak memory model. In practice, this is a guarantee already provided
by all interesting architectures (it only generates different assembler
on DEC Alpha).
Fixes #167
git pull https://github.com/bbockelm/xrootd fix-wakepend-loads
Or view, comment on, or merge it at:
https://github.com/xrootd/xrootd/pull/170
—
Reply to this email directly or view it on GitHub.
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