2015-11-06 11:42:27 +00:00
|
|
|
#pragma once
|
2021-04-12 06:34:26 +00:00
|
|
|
#include <stdint.h>
|
2015-11-06 11:42:27 +00:00
|
|
|
|
|
|
|
class SyncEvent
|
|
|
|
{
|
|
|
|
public:
|
2022-10-03 08:04:42 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
INFINITE_TIMEOUT = 0xFFFFFFFF
|
|
|
|
};
|
2015-11-06 11:42:27 +00:00
|
|
|
|
|
|
|
SyncEvent(bool bManualReset = true);
|
|
|
|
~SyncEvent(void);
|
|
|
|
|
2022-10-03 08:04:42 +00:00
|
|
|
void Trigger(void);
|
|
|
|
bool IsTriggered(int32_t iWaitTime = 0) const;
|
2015-11-06 11:42:27 +00:00
|
|
|
void Reset();
|
|
|
|
void * GetHandle();
|
|
|
|
|
|
|
|
protected:
|
2022-10-03 08:04:42 +00:00
|
|
|
SyncEvent(const SyncEvent &);
|
|
|
|
SyncEvent & operator=(const SyncEvent &);
|
2015-11-06 11:42:27 +00:00
|
|
|
|
|
|
|
void * m_Event;
|
2016-04-28 07:29:27 +00:00
|
|
|
#ifndef _WIN32
|
|
|
|
void * m_cond;
|
|
|
|
bool m_signalled;
|
|
|
|
#endif
|
2021-03-16 23:01:33 +00:00
|
|
|
};
|