This is the mail archive of the glibc-bugs@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]

[Bug nptl/16657] Lock elision breaks pthread_mutex_detroy


https://sourceware.org/bugzilla/show_bug.cgi?id=16657

--- Comment #10 from Andi Kleen <andi-bz at firstfloor dot org> ---
The reason I originally used DO_ELISION was that I was worried about two
parallel trylocks coming in here, and also corrupting the lock state.

But yes that fix may have been worse than the original problem, especially
since once the elision flag is set we don't care anymore.

So likely Andreas' original fix is the right one. Use FORCE_ELISION always.

Returning 0 in mutex_destroy would also work, but it could leave the mutex in
some awkward immediate state.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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