windows/Mutex

Raw operating-system-thread lock wrapper with exclusive and shared acquisition. The wrapper owns one lock state and exposes direct lock operations.


Mutex

Methods

INIT (--) Resets the mutex to the unlocked initial state.
lock (--) Acquires one exclusive lock ownership.
lockShared (--) Acquires one shared lock ownership.
tryLock (-- locked) Attempts one exclusive acquisition without waiting. Returns TRUE when the acquisition is made and FALSE otherwise.
tryLockShared (-- locked) Attempts one shared acquisition without waiting. Returns TRUE when the acquisition is made and FALSE otherwise.
unlock (--) Releases one exclusive acquisition.

Preconditions

  • The current thread holds one exclusive acquisition of this mutex.
unlockShared (--) Releases one shared acquisition.

Preconditions

  • The current thread holds one shared acquisition of this mutex.

Remarks


Lock semantics


See also