Add the possibility to switch from futex-based mutexes to pthread at runtime
Similar to what we have for GSlice
to use malloc()
, and for the same reason, it would be useful to have this also for the mutexes/condition variables.
-
helgrind
doesn't recognize the futexes and gives lots of false warnings because it believes no mutex is taken - pthread mutexes store the thread that is currently keeping it locked, which in
gdb
can be very useful to debug deadlocks
Some environment variable for this plus autodetection for helgrind
would be very useful. Main disadvantage is that this would add an indirection to all the mutex functions.
@pwithnall What do you think?