2011-10-03 11:41:19 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class cSemaphore
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cSemaphore( unsigned int a_MaxCount, unsigned int a_InitialCount = 0 );
|
|
|
|
~cSemaphore();
|
|
|
|
|
|
|
|
void Wait();
|
|
|
|
void Signal();
|
|
|
|
private:
|
2012-01-27 06:04:28 -08:00
|
|
|
void* m_Handle; // HANDLE pointer
|
|
|
|
|
|
|
|
#ifndef _WIN32
|
|
|
|
bool m_bNamed;
|
2011-10-03 11:41:19 -07:00
|
|
|
#endif
|
2012-01-27 06:04:28 -08:00
|
|
|
};
|