diff --git a/src/rt/rust_scheduler.cpp b/src/rt/rust_scheduler.cpp index 0e559d56060e..4262c34c6dc0 100644 --- a/src/rt/rust_scheduler.cpp +++ b/src/rt/rust_scheduler.cpp @@ -358,7 +358,7 @@ rust_scheduler::exit() { A(this, !lock.lock_held_by_current_thread(), "Shouldn't have lock"); scoped_lock with(lock); should_exit = true; - lock.signal_all(); + lock.signal(); } // diff --git a/src/rt/sync/lock_and_signal.cpp b/src/rt/sync/lock_and_signal.cpp index a18bc0ea0276..e82e6dc51b73 100644 --- a/src/rt/sync/lock_and_signal.cpp +++ b/src/rt/sync/lock_and_signal.cpp @@ -18,11 +18,6 @@ lock_and_signal::lock_and_signal() : _holding_thread(INVALID_THREAD) { - // FIXME: In order to match the behavior of pthread_cond_broadcast on - // Windows, we create manual reset events. This however breaks the - // behavior of pthread_cond_signal, fixing this is quite involved: - // refer to: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html - _event = CreateEvent(NULL, TRUE, FALSE, NULL); InitializeCriticalSection(&_cs); } @@ -92,17 +87,6 @@ void lock_and_signal::signal() { #endif } -/** - * Signal condition, and resume all waiting threads. - */ -void lock_and_signal::signal_all() { -#if defined(__WIN32__) - SetEvent(_event); -#else - CHECKED(pthread_cond_broadcast(&_cond)); -#endif -} - bool lock_and_signal::lock_held_by_current_thread() { #if defined(__WIN32__) diff --git a/src/rt/sync/lock_and_signal.h b/src/rt/sync/lock_and_signal.h index 654731269f1d..4fc629b9fac5 100644 --- a/src/rt/sync/lock_and_signal.h +++ b/src/rt/sync/lock_and_signal.h @@ -22,7 +22,6 @@ public: void unlock(); void wait(); void signal(); - void signal_all(); bool lock_held_by_current_thread(); };