I have the following questions about C1x mutexes (§7.25.4):
In which situations can mtx_lock()
return thrd_busy
instead of blocking? In which situations can mtx_timedlock()
return thrd_busy
?
Note that thrd_busy
is defined in §7.25.1 ¶5 as being returned "when a resource requested by a test and return function is already in use".
I would expect thrd_busy
to be only returned by mtx_trylock()
, or at most also by mtx_lock()
when invoked with a mtx_try
or mtx_try | mtx_recursive
mutex, but definitely not from mtx_timedlock()
, which requires a mutex which supports timeout, i.e. a mtx_timed
or mtx_timed | mtx_recursive
mutex.
Is this just and oversight in the draft? Or am I missing something?