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: [PATCH][BZ #19490] Add unwind descriptors to pthread_spin_init, etc. on i386


On 01/02/16 12:03, Szabolcs Nagy wrote:
> the current unlock is not enough for posix if trylock is
> acquire MO:
> 
> T1:
> unlock(l1);
> if (trylock(l2))...
> 
> T2:
> unlock(l2);
> if (trylock(l1))...
> 
> with one sided barrier, both trylock can fail to grab
> the lock (the loads are not guaranteed to happen after
> the stores) which is not seq cst, this does not happen
> with release MO unlock.
> 

sorry, acquire/release MO is not enough to fix this
in c11, on the hw level i believe it is enough with
arm memory model.


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