From daa5553777ad24fc458bf4250aad27de053b16e0 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Thu, 29 Dec 2016 23:39:40 -0500 Subject: [PATCH] fix another race condition --- libretro-common/queues/task_queue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libretro-common/queues/task_queue.c b/libretro-common/queues/task_queue.c index d5108438e4..d2eeb8a67f 100644 --- a/libretro-common/queues/task_queue.c +++ b/libretro-common/queues/task_queue.c @@ -332,8 +332,10 @@ static void task_queue_remove(task_queue_t *queue, retro_task_t *task) static void retro_task_threaded_push_running(retro_task_t *task) { slock_lock(running_lock); + slock_lock(queue_lock); task_queue_put(&tasks_running, task); scond_signal(worker_cond); + slock_unlock(queue_lock); slock_unlock(running_lock); }