c/thread/mtx unlock

Unlocks the mutex pointed to by.

The behavior is undefined if the mutex is not locked by the calling thread.

This function synchronizes-with subsequent mtx_lock, mtx_trylock, or mtx_timedlock on the same mutex. All lock/unlock operations on any given mutex form a single total order (similar to the modification order of an atomic).

Return value
thrd_success if successful, thrd_error otherwise.