diff options
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r-- | runtime/thread.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc index ffdea8a047..03fbd20235 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -16,6 +16,7 @@ #include "thread.h" +#include <limits.h> // for INT_MAX #include <pthread.h> #include <signal.h> #include <sys/resource.h> @@ -1504,7 +1505,7 @@ bool Thread::PassActiveSuspendBarriers(Thread* self) { done = pending_threads->CompareAndSetWeakRelaxed(cur_val, cur_val - 1); #if ART_USE_FUTEXES if (done && (cur_val - 1) == 0) { // Weak CAS may fail spuriously. - futex(pending_threads->Address(), FUTEX_WAKE_PRIVATE, -1, nullptr, nullptr, 0); + futex(pending_threads->Address(), FUTEX_WAKE_PRIVATE, INT_MAX, nullptr, nullptr, 0); } #endif } while (!done); |