2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Remove CEvent entirely.

This commit is contained in:
Darryl Pogue
2012-03-10 16:09:03 -08:00
parent 9e92b77438
commit 590eea770f
2 changed files with 0 additions and 78 deletions

View File

@ -316,47 +316,6 @@ void CLock::LeaveWrite () {
}
/*****************************************************************************
*
* CEvent
*
***/
//============================================================================
CEvent::CEvent (
ECEventResetBehavior resetType,
bool initialSet
) {
m_handle = CreateEvent(
nil, // security attributes
(resetType == kEventManualReset) ? true : false,
initialSet,
nil // name
);
}
//============================================================================
CEvent::~CEvent () {
(void) CloseHandle(m_handle);
}
//============================================================================
void CEvent::Signal () {
SetEvent(m_handle);
}
//============================================================================
void CEvent::Reset () {
ResetEvent(m_handle);
}
//============================================================================
bool CEvent::Wait (unsigned waitMs) {
ThreadAssertCanBlock(__FILE__, __LINE__);
return WaitForSingleObject(m_handle, waitMs) == WAIT_OBJECT_0;
}
/****************************************************************************
*
* Exported functions

View File

@ -95,41 +95,4 @@ public:
void LeaveWrite ();
};
/*****************************************************************************
*
* CEvent
*
***/
#ifdef HS_BUILD_FOR_WIN32
typedef HANDLE EventHandle;
//#else
//# error "CEvent: Not implemented on this platform"
//#endif
const unsigned kEventWaitForever = (unsigned)-1;
enum ECEventResetBehavior {
kEventManualReset,
kEventAutoReset,
};
class CEvent {
EventHandle m_handle;
public:
CEvent (
ECEventResetBehavior resetType,
bool initialSet = false
);
~CEvent ();
void Signal ();
void Reset ();
bool Wait (unsigned waitMs);
const EventHandle & Handle () const { return m_handle; }
};
#endif // HS_BUILD_FOR_WIN32
#endif