SemysLocalMutexLock

01 Locks a local mutex object.
02

void SemysLocalMutexLock(HSemysLocalMutex mutex);

03 Parameters:
  • mutex: The local mutex to lock.
04 The function will return when the calling thread has gained mutually exclusive access to the shared resource.
05 Every call to SemysLocalMutexLock() must be encompanied with a call to SemysLocalMutexUnlock() afterwards (after accessing the shared resource).
06 Local mutex objects can not be locked recursively. This means that an already locked mutex may not be locked again. Doing so will result in a deadlock.
07

I know that the pthread mutex objects can be configured to be reentrant and the Windows CriticalSection objects have this behaviour by default - but I am assuming the worst. Not every environment might be so forgiving.

08 Reference: SemysThreading.h
Implementation: Semys Library
See Also: Threading Sub-System, SemysLocalMutexUnlock()

Goto: Main Page; This page is part of the Semys software documentation. See About: Documentation for details.