From f9ae583e77486e70e7f05e66f18b9a1704ad9b80 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 16 Dec 2019 19:34:57 +0100 Subject: 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). --- executor/common_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor') 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) -- cgit mrf-deployment