shithub: dav1d

Download patch

ref: a1febec60ac5a815abad3b62f438aa7b5fae8c52
parent: 59f476969f5aa6954ebfeb121d1858e844b7b5ad
author: Sigrid Haflínudóttir <[email protected]>
date: Mon Sep 7 11:16:47 EDT 2020

threads: fix pthread_cond_wait

--- a/src/plan9_thread.c
+++ b/src/plan9_thread.c
@@ -103,8 +103,8 @@
 int
 pthread_cond_wait(pthread_cond_t *const cond, pthread_mutex_t *const mutex)
 {
-	qunlock(mutex);
 	qlock(cond->l);
+	qunlock(mutex);
 	rsleep(cond);
 	qunlock(cond->l);
 	qlock(mutex);