diff options
Diffstat (limited to 'common/threads.h')
-rw-r--r-- | common/threads.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/common/threads.h b/common/threads.h index 2d1c228d..ae033931 100644 --- a/common/threads.h +++ b/common/threads.h @@ -59,11 +59,6 @@ inline int althrd_equal(althrd_t thr0, althrd_t thr1) return thr0 == thr1; } -inline void althrd_exit(int res) -{ - ExitThread(res); -} - inline void althrd_yield(void) { SwitchToThread(); @@ -84,14 +79,6 @@ inline int almtx_unlock(almtx_t *mtx) return althrd_success; } -inline int almtx_trylock(almtx_t *mtx) -{ - if(!mtx) return althrd_error; - if(!TryEnterCriticalSection(mtx)) - return althrd_busy; - return althrd_success; -} - #else #include <stdint.h> @@ -126,11 +113,6 @@ inline int althrd_equal(althrd_t thr0, althrd_t thr1) return pthread_equal(thr0, thr1); } -inline void althrd_exit(int res) -{ - pthread_exit((void*)(intptr_t)res); -} - inline void althrd_yield(void) { sched_yield(); @@ -151,17 +133,6 @@ inline int almtx_unlock(almtx_t *mtx) return althrd_success; } -inline int almtx_trylock(almtx_t *mtx) -{ - int ret = pthread_mutex_trylock(mtx); - switch(ret) - { - case 0: return althrd_success; - case EBUSY: return althrd_busy; - } - return althrd_error; -} - inline void alcall_once(alonce_flag *once, void (*callback)(void)) { |