diff options
author | James Almer <jamrial@gmail.com> | 2018-09-30 00:09:07 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-09-30 00:14:52 +0300 |
commit | ac7367d8f1accb013a65ffaa52bcd1fc8ba15126 (patch) | |
tree | 9f83f2089caadb06ea08297ee124bd9b7310b00c /src/win32 | |
parent | 755fcdf884aae9ee85ef611d24398a39da53f407 (diff) |
threads: Inline some Windows pthreads compat wrappers in the header
They are all single line functions.
Diffstat (limited to 'src/win32')
-rw-r--r-- | src/win32/thread.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/win32/thread.c b/src/win32/thread.c index 4932241..20e897b 100644 --- a/src/win32/thread.c +++ b/src/win32/thread.c @@ -36,46 +36,6 @@ #include "config.h" #include "src/thread.h" -void pthread_mutex_init(pthread_mutex_t* mutex, - const pthread_mutexattr_t* attr) -{ - (void)attr; - InitializeCriticalSection(mutex); -} - -void pthread_mutex_destroy(pthread_mutex_t* mutex) { - DeleteCriticalSection(mutex); -} - -void pthread_mutex_lock(pthread_mutex_t* mutex) { - EnterCriticalSection(mutex); -} - -void pthread_mutex_unlock(pthread_mutex_t* mutex) { - LeaveCriticalSection(mutex); -} - -void pthread_cond_init(pthread_cond_t* cond, const pthread_condattr_t* attr) { - (void)attr; - InitializeConditionVariable(cond); -} - -void pthread_cond_destroy(pthread_cond_t* cond) { - (void)cond; -} - -void pthread_cond_wait(pthread_cond_t* cond, pthread_mutex_t* mutex) { - SleepConditionVariableCS(cond, mutex, INFINITE); -} - -void pthread_cond_signal(pthread_cond_t* cond) { - WakeConditionVariable(cond); -} - -void pthread_cond_broadcast(pthread_cond_t* cond) { - WakeAllConditionVariable(cond); -} - typedef struct dav1d_win32_thread_t { HANDLE h; void* param; |