This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/16432] pthread_spin_unlock should imply a memory barrier
- From: "mikulas at artax dot karlin.mff.cuni.cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 24 Sep 2014 16:54:24 +0000
- Subject: [Bug nptl/16432] pthread_spin_unlock should imply a memory barrier
- Auto-submitted: auto-generated
- References: <bug-16432-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16432
--- Comment #2 from Mikulas Patocka <mikulas at artax dot karlin.mff.cuni.cz> ---
Yes, I was looking at this function for the purpose of "abusing" it for a
portable memory barrier.
Unfortunatelly, POSIX doesn't provide any portable memory barrier. C11 has
botched barriers - even the strongest atomic model __ATOMIC_SEQ_CST
synchronizes only with locks an other atomic accesses, it doesn't synchronize
with normal memory references. Currently, there is no way to do a memory
barrier portably.
--
You are receiving this mail because:
You are on the CC list for the bug.