summaryrefslogtreecommitdiff
path: root/src/common/mutex.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-09-18 13:09:16 +0200
committerHaru <haru@dotalux.com>2015-09-25 12:55:36 +0200
commit1aea178ef7cdb76eda5600540b5fbd29fd54ff88 (patch)
tree855d4feafba212d7f36872c1b46814c1f1a85e75 /src/common/mutex.c
parente99bf73af31a8b1f09b9ce033c16832ee5cac51d (diff)
downloadhercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.gz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.bz2
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.tar.xz
hercules-1aea178ef7cdb76eda5600540b5fbd29fd54ff88.zip
More aggressive whitespace cleanup. Follow up to 51329e6
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/mutex.c')
-rw-r--r--src/common/mutex.c17
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()
-
-