We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9b7ad5 commit 2986f4dCopy full SHA for 2986f4d
1 file changed
src/bthread/condition_variable.cpp
@@ -43,6 +43,7 @@ extern "C" {
43
44
extern int bthread_mutex_unlock(bthread_mutex_t*);
45
extern int bthread_mutex_lock_contended(bthread_mutex_t*);
46
+extern void bthread_flush();
47
48
int bthread_cond_init(bthread_cond_t* __restrict c,
49
const bthread_condattr_t*) {
@@ -67,6 +68,8 @@ int bthread_cond_signal(bthread_cond_t* c) {
67
68
// don't touch ic any more
69
bool no_signal = true;
70
bthread::butex_wake(saved_seq, no_signal);
71
+ // flush unsignaled tasks manually
72
+ bthread_flush();
73
return 0;
74
}
75
0 commit comments