mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-27 01:45:37 -05:00
a01bcf5241
* Insert newline at EOF * Fix formatting
24 lines
406 B
C++
24 lines
406 B
C++
#ifndef MX_SEMAPHORE_H
|
|
#define MX_SEMAPHORE_H
|
|
|
|
#include "mxtypes.h"
|
|
|
|
#include <windows.h>
|
|
|
|
class MxSemaphore {
|
|
public:
|
|
MxSemaphore();
|
|
|
|
// Inlined only, no offset
|
|
~MxSemaphore() { CloseHandle(m_hSemaphore); }
|
|
|
|
virtual MxResult Init(MxU32 p_initialCount, MxU32 p_maxCount);
|
|
|
|
void Wait(MxU32 p_timeoutMS);
|
|
void Release(MxU32 p_releaseCount);
|
|
|
|
private:
|
|
HANDLE m_hSemaphore;
|
|
};
|
|
|
|
#endif // MX_SEMAPHORE_H
|