Merging lock elision into glibc
Posted Jul 6, 2013 0:36 UTC (Sat) by wahern
Parent article: Merging lock elision into glibc
FWIW, an interesting comment in the Austin Group Defect Tracker thread (thanks to mjw, above, for the link):
Side note: in OpenBSD, PTHREAD_MUTEX_DEFAULT mutexes call abort() if you pthread_mutex_lock() a mutex you already hold or pthread_mutex_unlock() a mutex you don't hold...and that has turned up several locking bugs in open source projects like glib2, where code *simply failed to grab the right lock* and no one noticed because the default mutexes on Linux returned an ignorable error. The assumption that most code has been debugged completely and that therefore the default behavior should be to turn off the checks and run as fast as possible is a bad joke.
to post comments)