diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-12-16 19:34:57 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-12-16 19:37:38 +0100 |
| commit | f9ae583e77486e70e7f05e66f18b9a1704ad9b80 (patch) | |
| tree | e74df3f8ffeb4a29e380576f8a1c69f16e61f23d /executor | |
| parent | f5963ab6ed3631ef4d83212ad708b4293d9e3939 (diff) | |
executor: fix FUTEX_WAKE call
Amusingly we never passed number of threads to wake for FUTEX_WAKE.
It somehow worked reliably on linux (we just needed it to not be 0,
so presumably garbage in registers did it).
However, in gVisor every other syscall wasn't even started
(first syscall on a thread started, but second on the same worker
thread wasn't unable to start).
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 4ad991fc4..f333c41f1 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -37,7 +37,7 @@ static void event_set(event_t* ev) if (ev->state) fail("event already set"); __atomic_store_n(&ev->state, 1, __ATOMIC_RELEASE); - syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG); + syscall(SYS_futex, &ev->state, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, 1000000); } static void event_wait(event_t* ev) |
