aboutsummaryrefslogtreecommitdiff
path: root/src/jthread/jmutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/jthread/jmutex.h')
-rw-r--r--src/jthread/jmutex.h53
1 files changed, 0 insertions, 53 deletions
diff --git a/src/jthread/jmutex.h b/src/jthread/jmutex.h
index 8efdc7bc5..e57cd8a43 100644
--- a/src/jthread/jmutex.h
+++ b/src/jthread/jmutex.h
@@ -53,10 +53,8 @@ class JMutex
public:
JMutex();
~JMutex();
- int Init();
int Lock();
int Unlock();
- bool IsInitialized() { return initialized; }
private:
#if (defined(WIN32) || defined(_WIN32_WCE))
@@ -76,57 +74,6 @@ private:
return false;
}
#endif // WIN32
- bool initialized;
};
-#ifdef _WIN32
-
-class Event {
- HANDLE hEvent;
-
-public:
- Event() {
- hEvent = CreateEvent(NULL, 0, 0, NULL);
- }
-
- ~Event() {
- CloseHandle(hEvent);
- }
-
- void wait() {
- WaitForSingleObject(hEvent, INFINITE);
- }
-
- void signal() {
- SetEvent(hEvent);
- }
-};
-
-#else
-
-#include <semaphore.h>
-
-class Event {
- sem_t sem;
-
-public:
- Event() {
- sem_init(&sem, 0, 0);
- }
-
- ~Event() {
- sem_destroy(&sem);
- }
-
- void wait() {
- sem_wait(&sem);
- }
-
- void signal() {
- sem_post(&sem);
- }
-};
-
-#endif
-
#endif // JMUTEX_H