isle/LEGO1/mxsemaphore.h
Misha cb8c143ce5
Finish MxDiskStreamController methods (#359)
* more mxdiskstreamcontroller methods

* further debugging and fixes

* add more functions

* Update mxdiskstreamprovider.cpp

* fix build

* implement MxDiskStreamProvider::PerformWork

* Update mxdiskstreamprovider.cpp

* Update mxdiskstreamprovider.cpp

* Update mxdssource.h

* remove debug prints

* Update mxdiskstreamprovider.cpp

* Mostly match MxDiskStreamController::FUN_100c8540

* Mostly match MxDiskStreamProvider::FUN_100d1780

* Mostly match MxDiskStreamProvider::PerformWork

* Fixes

* Retype some members

* Various annotations

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-12-25 19:32:01 +01:00

25 lines
427 B
C++

#ifndef MX_SEMAPHORE_H
#define MX_SEMAPHORE_H
#include "mxtypes.h"
#include <windows.h>
// SIZE 0x08
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; // 0x04
};
#endif // MX_SEMAPHORE_H