From b8d8eaa8b2c46f79e8a580a402ec7c472075d073 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 3 Mar 2024 16:13:02 +0100 Subject: enforce naming convention --- src/mutex.h | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) (limited to 'src/mutex.h') 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 #include -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 -- cgit v1.2.3-70-g09d2