API for platform independent mutex synchronization primitive.
typedef struct Mutex* HMutex;
Creates a new HMutex.
mutex - A new Mutex handle.
Deletes a HMutex.
mutex - Mutex handle to delete.
Lock a HMutex, will block until mutex is unlocked if already locked elsewhere.
mutex - Mutex handle to lock.
Tries to lock a HMutex, if mutex is already locked it will return false and continue without locking the mutex.
mutex - Mutex handle to lock.
result - True if mutex was successfully locked, false otherwise.
Unlock a HMutex.
mutex - Mutex handle to unlock.
Will lock a Mutex and automatically unlock it at the end of the scope.
mutex - Mutex handle to lock.