diff options
Diffstat (limited to 'libgo/runtime/thread-linux.c')
-rw-r--r-- | libgo/runtime/thread-linux.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libgo/runtime/thread-linux.c b/libgo/runtime/thread-linux.c index 8dd5fc4b481..6a69fb429a4 100644 --- a/libgo/runtime/thread-linux.c +++ b/libgo/runtime/thread-linux.c @@ -3,6 +3,16 @@ // license that can be found in the LICENSE file. #include "runtime.h" +#include "defs.h" + +// Linux futex. +// +// futexsleep(uint32 *addr, uint32 val) +// futexwakeup(uint32 *addr) +// +// Futexsleep atomically checks if *addr == val and if so, sleeps on addr. +// Futexwakeup wakes up threads sleeping on addr. +// Futexsleep is allowed to wake up spuriously. #include <errno.h> #include <string.h> |