This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Synchronizing auxiliary mutex data


On Tue, 2017-06-20 at 17:02 +0200, Andreas Schwab wrote:
> On Jun 19 2017, Torvald Riegel <triegel@redhat.com> wrote:
> 
> > __owner accesses need to use atomics (which they don't, currently).
> 
> Does that mean mutexes are broken right now?

No, I would not characterize it like that.  Technically, this is
undefined behavior because the program is not data-race-free.  However,
all we'd need for the accesses to __owner are relaxed MO atomics, so on
the architectures we care about it's sufficient if the compiler just
does the access once without splitting it up into different parts; we
can assume that it is very likely that it will do that in practice.
We should avoid the undefined behavior eventually, but it is nothing
that I'd be really worried right now.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]