The function
lock-recursively-locked-p
is the predicate for whether a lock is recursively locked. Since that can change at any time, the result is reliable only if you know that the state is not going to change. For the definition of recursive locking, see the make-lock argument
recursivep
.
If the lock is a "sharing" lock,
lock-recursively-locked-p
checks for an exclusive lock.