The function
lock-recursive-p
is the predicate for whether the lock
lock
allows recursive locking (that is, whether it can be repeatedly locked by the same process).
See the make-lock argument recursivep .
lock-recursive-p
does not check whether the lock is currently locked recursively. The function lock-recursively-locked-p does that.