current_mutex/3

current_mutex(? MutexId, ? ThreadId, ? Count)*

Enumerates all existing mutexes. If the mutex is held by some thread, ThreadId is unified with the identifier of the holding thread and Count with the recursive count of the mutex. Otherwise, ThreadId is [] and Count is 0.