================
@@ -16,7 +17,10 @@ function_to_call() {
 void *
 suspend_func (void *unused) {
   pthread_setname_np("Look for me");
+  pthread_mutex_lock(&signal_mutex);
+  g_signaled = 1;
   pthread_cond_signal(&signal_cond);
+  pthread_mutex_unlock(&signal_mutex);
----------------
Teemperor wrote:

pthread_cond_wait calls `pthread_mutex_lock(&signal_mutex);` internally after 
it wakes up, so without the unlock here its just a deterministic deadlock.

https://github.com/llvm/llvm-project/pull/203202
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to