summaryrefslogtreecommitdiff
path: root/src/common/mutex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/mutex.h')
-rw-r--r--src/common/mutex.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/mutex.h b/src/common/mutex.h
index ce13a28b7..ced91ab8e 100644
--- a/src/common/mutex.h
+++ b/src/common/mutex.h
@@ -6,29 +6,29 @@
#include "../common/cbasetypes.h"
-typedef struct ramutex *ramutex; // Mutex
-typedef struct racond *racond; // Condition Var
+typedef struct ramutex ramutex; // Mutex
+typedef struct racond racond; // Condition Var
/**
* Creates a Mutex
*
* @return not NULL
*/
-ramutex ramutex_create();
+ramutex *ramutex_create();
/**
* Destroys a Mutex
*
* @param m - the mutex to destroy
*/
-void ramutex_destroy( ramutex m );
+void ramutex_destroy(ramutex *m);
/**
* Gets a lock
*
* @param m - the mutex to lock
*/
-void ramutex_lock( ramutex m);
+void ramutex_lock(ramutex *m);
/**
* Trys to get the Lock
@@ -37,14 +37,14 @@ void ramutex_lock( ramutex m);
*
* @return boolean (true = got the lock)
*/
-bool ramutex_trylock( ramutex m );
+bool ramutex_trylock(ramutex *m);
/**
* Unlocks a mutex
*
* @param m - the mutex to unlock
*/
-void ramutex_unlock( ramutex m);
+void ramutex_unlock(ramutex *m);
/**
@@ -52,14 +52,14 @@ void ramutex_unlock( ramutex m);
*
* @return not NULL
*/
-racond racond_create();
+racond *racond_create();
/**
* Destroy a Condition variable
*
* @param c - the condition variable to destroy
*/
-void racond_destroy( racond c );
+void racond_destroy(racond *c);
/**
* Waits Until state is signaled
@@ -68,7 +68,7 @@ void racond_destroy( racond c );
* @param m - the mutex used for synchronization
* @param timeout_ticks - timeout in ticks ( -1 = INFINITE )
*/
-void racond_wait( racond c, ramutex m, sysint timeout_ticks);
+void racond_wait(racond *c, ramutex *m, sysint timeout_ticks);
/**
* Sets the given condition var to signaled state
@@ -78,7 +78,7 @@ void racond_wait( racond c, ramutex m, sysint timeout_ticks);
* @note:
* Only one waiter gets notified.
*/
-void racond_signal( racond c );
+void racond_signal(racond *c);
/**
* Sets notifies all waiting threads thats signaled.
@@ -87,7 +87,7 @@ void racond_signal( racond c );
* @note:
* All Waiters getting notified.
*/
-void racond_broadcast( racond c );
+void racond_broadcast(racond *c);
#endif /* _COMMON_MUTEX_H_ */