On 13/05/2015 11:38, Peter Maydell wrote: > > then we'll turn on the error checking, and a double-unlock > will result in a call to abort(). If you run QEMU under > a debugger you'll get a backtrace which will tell you which > code did the second unlock (and thus which mutex it is). > > (Linux has a similar attribute, though it is named > PTHREAD_MUTEX_ERRORCHECK_NP; we might want to consider > turning on mutex debugging for --enable-debug builds.)
We had it, but I had to disable it because it doesn't work (at all) when you fork. The PID changes under the code's feet and subsequent unlocks do not like it. Paolo