From 92b9d75d7256be71d8c8b18438af9494b78f0e96 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 11 May 2015 23:44:36 +0200 Subject: threads: use utility+POSIX functions instead of weird wrappers There is not much of a reason to have these wrappers around. Use POSIX standard functions directly, and use a separate utility function to take care of the timespec calculations. (Course POSIX for using this weird format for time values.) --- osdep/threads.c | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'osdep/threads.c') diff --git a/osdep/threads.c b/osdep/threads.c index 4f5b39d504..cccce85d1c 100644 --- a/osdep/threads.c +++ b/osdep/threads.c @@ -27,19 +27,6 @@ #include "threads.h" #include "timer.h" -int mpthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - int64_t abstime) -{ - struct timespec ts = mp_time_us_to_timespec(abstime); - return pthread_cond_timedwait(cond, mutex, &ts); -} - -int mpthread_cond_timedwait_rel(pthread_cond_t *cond, pthread_mutex_t *mutex, - double s) -{ - return mpthread_cond_timedwait(cond, mutex, mp_add_timeout(mp_time_us(), s)); -} - int mpthread_mutex_init_recursive(pthread_mutex_t *mutex) { pthread_mutexattr_t attr; -- cgit v1.2.3