Quoting [thread.mutex.recursive]:
A thread that owns a
recursive_mutex
object may acquire additional levels of ownership by callinglock()
ortry_lock()
on that object. It is unspecified how many levels of ownership may be acquired by a single thread. If a thread has already acquired the maximum level of ownership for arecursive_mutex
object, additional calls totry_lock()
shall fail, and additional calls tolock()
shall throw an exception of typesystem_error
.
Is there a lower bound greater than 1 for the "maximum level of ownership"? What about recursive pthread mutexes?