diff options
Diffstat (limited to 'src/common/mutex.c')
-rw-r--r-- | src/common/mutex.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/common/mutex.c b/src/common/mutex.c index 5dfb3d01c..715609628 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -25,7 +25,6 @@ struct ramutex{ #endif }; - struct racond{ #ifdef WIN32 HANDLE events[2]; @@ -40,14 +39,12 @@ struct racond{ #endif }; - //////////////////// // Mutex // // Implementation: // - ramutex *ramutex_create(void) { struct ramutex *m; @@ -66,7 +63,6 @@ ramutex *ramutex_create(void) { return m; }//end: ramutex_create() - void ramutex_destroy(ramutex *m) { #ifdef WIN32 @@ -79,7 +75,6 @@ void ramutex_destroy(ramutex *m) { }//end: ramutex_destroy() - void ramutex_lock(ramutex *m) { #ifdef WIN32 @@ -89,7 +84,6 @@ void ramutex_lock(ramutex *m) { #endif }//end: ramutex_lock - bool ramutex_trylock(ramutex *m) { #ifdef WIN32 if(TryEnterCriticalSection(&m->hMutex) != FALSE) @@ -104,7 +98,6 @@ bool ramutex_trylock(ramutex *m) { #endif }//end: ramutex_trylock() - void ramutex_unlock(ramutex *m) { #ifdef WIN32 LeaveCriticalSection(&m->hMutex); @@ -114,8 +107,6 @@ void ramutex_unlock(ramutex *m) { }//end: ramutex_unlock() - - /////////////// // Condition Variables // @@ -143,7 +134,6 @@ racond *racond_create(void) { return c; }//end: racond_create() - void racond_destroy(racond *c) { #ifdef WIN32 CloseHandle( c->events[ EVENT_COND_SIGNAL ] ); @@ -156,14 +146,12 @@ void racond_destroy(racond *c) { aFree(c); }//end: racond_destroy() - void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) { #ifdef WIN32 register DWORD ms; int result; bool is_last = false; - EnterCriticalSection(&c->waiters_lock); c->nWaiters++; LeaveCriticalSection(&c->waiters_lock); @@ -191,7 +179,6 @@ void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) { if(is_last == true) ResetEvent( c->events[EVENT_COND_BROADCAST] ); - ramutex_lock(m); #else @@ -210,7 +197,6 @@ void racond_wait(racond *c, ramutex *m, sysint timeout_ticks) { #endif }//end: racond_wait() - void racond_signal(racond *c) { #ifdef WIN32 # if 0 @@ -228,7 +214,6 @@ void racond_signal(racond *c) { #endif }//end: racond_signal() - void racond_broadcast(racond *c) { #ifdef WIN32 # if 0 @@ -245,5 +230,3 @@ void racond_broadcast(racond *c) { pthread_cond_broadcast(&c->hCond); #endif }//end: racond_broadcast() - - |