9 #ifndef THREADMUTEX_DEFINED
10 #define THREADMUTEX_DEFINED 1
17 enum ThreadMutexReturnCode_
19 THREADMUTEX_SUCCESS
= 0,
22 typedef enum ThreadMutexReturnCode_ ThreadMutexReturnCode
;
24 typedef struct ThreadMutex_ ThreadMutex
;
30 pthread_mutex_t mutex
;
36 ThreadMutex
* ThreadMutex_new(void);
39 void ThreadMutex_destroy(ThreadMutex
* self
);
41 // --- member functions
42 // -- operational functions
43 ThreadMutexReturnCode
ThreadMutex_lock(ThreadMutex
*self
);
44 ThreadMutexReturnCode
ThreadMutex_unlock(ThreadMutex
*self
);