Condition variable's wait_for and wait_until method does not unlock the mutex when the thread is blocking

27 views
Skip to first unread message

张华

unread,
Nov 20, 2015, 1:34:49 AM11/20/15
to Native-Client-Discuss
I'm building with clang-newlib. When I tried to use condition variable's wait_until and wait_for method, I noticed that both of them don't unlock the mutex when the thread is blocked. As a result, other threads waiting for the lock can't proceed. Anyone else has met similar issue?

Ben Smith

unread,
Dec 11, 2015, 2:33:42 PM12/11/15
to Native-Client-Discuss
What condition variable class are you using? AFAIK, NaCl just provides pthread condition variables, which don't have that API. You can see it unlock the mutex here, in the source: https://chromium.googlesource.com/native_client/src/native_client/+/master/src/untrusted/pthread/nc_condvar.c#90
Reply all
Reply to author
Forward
0 new messages