From 2619d8eff4e2c1cf54574acfbd0cd5895e362e45 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 4 Sep 2016 15:43:12 +0200 Subject: client API: implement mpv_suspend/resume slightly differently Why do these API calls even still exist? I don't know, and maybe they don't make any sense anymore. But whether they should be removed or not is not a decision I want to make now. I want to get rid of mp_dispatch_suspend/resume(), though. So implement the client APIs slightly differently. --- misc/dispatch.c | 4 ++-- misc/dispatch.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'misc') diff --git a/misc/dispatch.c b/misc/dispatch.c index 2ddac2c92d..0c8727d053 100644 --- a/misc/dispatch.c +++ b/misc/dispatch.c @@ -230,7 +230,7 @@ void mp_dispatch_queue_process(struct mp_dispatch_queue *queue, double timeout) // not a synchronization mechanism; it merely makes sure the target thread does // not leave mp_dispatch_queue_process(), even if it's done. mp_dispatch_lock() // can be used for exclusive access. -void mp_dispatch_suspend(struct mp_dispatch_queue *queue) +static void mp_dispatch_suspend(struct mp_dispatch_queue *queue) { pthread_mutex_lock(&queue->lock); queue->suspend_requested++; @@ -247,7 +247,7 @@ void mp_dispatch_suspend(struct mp_dispatch_queue *queue) } // Undo mp_dispatch_suspend(). -void mp_dispatch_resume(struct mp_dispatch_queue *queue) +static void mp_dispatch_resume(struct mp_dispatch_queue *queue) { pthread_mutex_lock(&queue->lock); assert(queue->suspended); diff --git a/misc/dispatch.h b/misc/dispatch.h index 96a5d7cf4b..7a0d037cab 100644 --- a/misc/dispatch.h +++ b/misc/dispatch.h @@ -15,8 +15,6 @@ void mp_dispatch_enqueue_autofree(struct mp_dispatch_queue *queue, 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); -- cgit v1.2.3