19 if ((m_hSemaphore = CreateSemaphoreA(
NULL, p_initialCount, p_maxCount,
NULL))) {
29 WaitForSingleObject(m_hSemaphore, p_timeoutMS);
35 ReleaseSemaphore(m_hSemaphore, p_releaseCount,
NULL);
Implements a lightweight wrapper for Windows semaphores, allowing safe synchronization between thread...
virtual MxResult Init(MxU32 p_initialCount, MxU32 p_maxCount)
Initializes the semaphore with both initial and maximum counts.
void Release(MxU32 p_releaseCount)
Increases the semaphore count, unblocking waiting threads if any.
void Wait(MxU32 p_timeoutMS)
Waits on the semaphore for the specified timeout (in milliseconds).
#define DECOMP_SIZE_ASSERT(T, S)
#define NULL
[AI] Null pointer value (C/C++ semantics).
#define FAILURE
[AI] Used to indicate a failed operation in result codes.
#define SUCCESS
[AI] Used to indicate a successful operation in result codes.