This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix sem_post race (bug 14532)
On 09/13/2012 12:21 PM, Torvald Riegel wrote:
> I'm wondering whether it would be better to use an explicit suffix in
> the long-term.
I would think so.
> But the existing code relies
> on this; is this guarantee commonly known to be true on all
> architectures (e.g., is a syscall always like a full membar,
> everywhere)?
While the truncated question posed here isn't true, the actual question
you are asking relates to the futex syscall in particular.
And to answer that question we must look at <asm/futex.h>, wherein we
find that the atomic operations used are themselves full barriers.
(Or at least for alpha and ppc, which were the only ones I examined.)
r~