views:

170

answers:

1

Does pthreads support any method that allows you to query the number of times a recursive mutex has been locked?

+1  A: 

There is no official, portable way to do this.

You could get this behavior portably by tracking the lock count yourself—perhaps by writing wrappers for the lock and unlock functions, and creating a struct with the mutex and count as members.

LnxPrgr3