summaryrefslogtreecommitdiffstats
path: root/osdep/threads.h
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/threads.h')
-rw-r--r--osdep/threads.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/osdep/threads.h b/osdep/threads.h
index 02f6ac1489..fa9199d63d 100644
--- a/osdep/threads.h
+++ b/osdep/threads.h
@@ -2,12 +2,18 @@
#define MP_OSDEP_THREADS_H_
#include <pthread.h>
+#include <inttypes.h>
-struct timespec mpthread_get_deadline(double timeout);
-
+// Call pthread_cond_timedwait() with an absolute timeout using the same
+// time source/unit as mp_time_us() (microseconds).
int mpthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
- double timeout);
+ int64_t abstime);
+
+// Wait by a relative amount of time in seconds.
+int mpthread_cond_timedwait_rel(pthread_cond_t *cond, pthread_mutex_t *mutex,
+ double seconds);
+// Helper to reduce boiler plate.
int mpthread_mutex_init_recursive(pthread_mutex_t *mutex);
#endif