_LeaveMutex


include vmm.inc

cCall    _LeaveMutex, <MutexHandle>

Leaves a mutex. If the reentry count of the mutex is greater than one, this function decrements the reentry count. If the reentry count is one, it becomes unowned and the highest priority thread waiting for the mutex is released.

MutexHandle

Handle of the mutex.

This service causes a context switch if the execution priority of the released thread is higher priority than the current thread.

Only the thread owning a mutex can leave it.

When the critical section is freed, any threads waiting for the critical section are released.

See also _EnterMutex, _LeaveMustComplete