forked from mirrors/kolyah35-minecraft-pe-0.6.1
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
59
project/lib_projects/raknet/jni/RaknetSources/SignaledEvent.h
Executable file
59
project/lib_projects/raknet/jni/RaknetSources/SignaledEvent.h
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
#ifndef __SIGNALED_EVENT_H
|
||||
#define __SIGNALED_EVENT_H
|
||||
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#include <sys/types.h>
|
||||
#include "SimpleMutex.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include "Export.h"
|
||||
|
||||
namespace RakNet
|
||||
{
|
||||
|
||||
class RAK_DLL_EXPORT SignaledEvent
|
||||
{
|
||||
public:
|
||||
SignaledEvent();
|
||||
~SignaledEvent();
|
||||
|
||||
void InitEvent(void);
|
||||
void CloseEvent(void);
|
||||
void SetEvent(void);
|
||||
void WaitOnEvent(int timeoutMs);
|
||||
|
||||
protected:
|
||||
#ifdef _WIN32
|
||||
HANDLE eventList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#else
|
||||
SimpleMutex isSignaledMutex;
|
||||
bool isSignaled;
|
||||
#if !defined(ANDROID)
|
||||
pthread_condattr_t condAttr;
|
||||
#endif
|
||||
pthread_cond_t eventList;
|
||||
pthread_mutex_t hMutex;
|
||||
pthread_mutexattr_t mutexAttr;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace RakNet
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue