diff options
Diffstat (limited to 'src/mutex.h')
| -rw-r--r-- | src/mutex.h | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/src/mutex.h b/src/mutex.h index a061c2e..a745947 100644 --- a/src/mutex.h +++ b/src/mutex.h @@ -9,34 +9,32 @@ #include <conio.h> #include <synchapi.h> -typedef struct t_mutex +typedef struct t_ts_mutex { HANDLE mutex; -} mutex; +} ts_mutex; -typedef struct t_thread +typedef struct t_ts_thread { HANDLE thread; int valid; -} thread; +} ts_thread; #endif -thread thread_start(void *(*start_routine) (void *), void *arg); -void thread_join(thread *thread); -int thread_tryjoin(thread *thread); -void thread_detach(thread *thread); -void thread_stop(thread *thread); -int thread_get_id(); -void thread_sleep(int microseconds); -void thread_exit(); - - -mutex mutex_create_recursive(); -mutex mutex_create(); -void mutex_lock(mutex *mutex); -int mutex_trylock(mutex *mutex); -void mutex_unlock(mutex *mutex); -void mutex_destroy(mutex *mutex); - +ts_thread ts_thread_start(void *(*start_routine) (void *), void *arg); +void ts_thread_join(ts_thread *ts_thread); +int ts_thread_tryjoin(ts_thread *ts_thread); +void ts_thread_detach(ts_thread *ts_thread); +void ts_thread_stop(ts_thread *ts_thread); +int ts_thread_get_id(); +void ts_thread_sleep(int microseconds); +void ts_thread_exit(); + +ts_mutex ts_mutex_create_recursive(); +ts_mutex ts_mutex_create(); +void ts_mutex_lock(ts_mutex *ts_mutex); +int ts_mutex_trylock(ts_mutex *ts_mutex); +void ts_mutex_unlock(ts_mutex *ts_mutex); +void ts_mutex_destroy(ts_mutex *ts_mutex); #endif
\ No newline at end of file |
