]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Stop describing an acquire operation as a read barrier and a release
authorAlan Cox <alc@FreeBSD.org>
Fri, 14 Aug 2015 17:49:03 +0000 (17:49 +0000)
committerAlan Cox <alc@FreeBSD.org>
Fri, 14 Aug 2015 17:49:03 +0000 (17:49 +0000)
commitcff0a327b8e5f83be60b0d7455abca5e5f747a1d
treeee9150e70023a7c0bdf2c71706c943fd297af413
parent46d49ed78eb254c55c7b22fc71b2aebfe3bf5b4f
Stop describing an acquire operation as a read barrier and a release
operation as a write barrier.  That description has never been correct,
and it has caused confusion.  An acquire operation orders writes as well
as reads, and a release operation orders reads as well as writes.

Also, explicitly say that a thread doesn't see its own accesses being
reordered.  The reordering of a thread's accesses is only (potentially)
visible to another thread.  Thus, memory barriers need only be used to
control the ordering of accesses between threads, not within a thread.

Reviewed by: bde, kib
Discussed with: jhb
MFC after: 1 week
share/man/man9/atomic.9