From 2b26517ef705c4043419e2e70dacd7760af1137e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 23 Apr 2014 20:37:57 +0200 Subject: dispatch: move into its own source file This was part of osdep/threads.c out of laziness. But it doesn't contain anything OS dependent. Note that the rest of threads.c actually isn't all that OS dependent either (just some minor ifdeffery to work around the lack of clock_gettime() on OSX). --- osdep/threads.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'osdep/threads.h') diff --git a/osdep/threads.h b/osdep/threads.h index 3eb4ce2ffc..3d060009cb 100644 --- a/osdep/threads.h +++ b/osdep/threads.h @@ -1,7 +1,6 @@ #ifndef MP_OSDEP_THREADS_H_ #define MP_OSDEP_THREADS_H_ -#include #include struct timespec mpthread_get_deadline(double timeout); @@ -11,24 +10,4 @@ int mpthread_cond_timed_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, int mpthread_mutex_init_recursive(pthread_mutex_t *mutex); - -typedef void (*mp_dispatch_fn)(void *data); -struct mp_dispatch_queue; - -struct mp_dispatch_queue *mp_dispatch_create(void *talloc_parent); -void mp_dispatch_set_wakeup_fn(struct mp_dispatch_queue *queue, - void (*wakeup_fn)(void *wakeup_ctx), - void *wakeup_ctx); -void mp_dispatch_enqueue(struct mp_dispatch_queue *queue, - mp_dispatch_fn fn, void *fn_data); -void mp_dispatch_enqueue_autofree(struct mp_dispatch_queue *queue, - mp_dispatch_fn fn, void *fn_data); -void mp_dispatch_run(struct mp_dispatch_queue *queue, - mp_dispatch_fn fn, void *fn_data); -void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout); -void mp_dispatch_suspend(struct mp_dispatch_queue *queue); -void mp_dispatch_resume(struct mp_dispatch_queue *queue); -void mp_dispatch_lock(struct mp_dispatch_queue *queue); -void mp_dispatch_unlock(struct mp_dispatch_queue *queue); - #endif -- cgit v1.2.3