From 1d621ab1725d1eba0fafef4575aef72682cd57ad Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 21 Dec 2020 23:21:58 -0700 Subject: Kernel: Some futex improvements This adds support for FUTEX_WAKE_OP, FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_REQUEUE, and FUTEX_CMP_REQUEUE, as well well as global and private futex and absolute/relative timeouts against the appropriate clock. This also changes the implementation so that kernel resources are only used when a thread is blocked on a futex. Global futexes are implemented as offsets in VMObjects, so that different processes can share a futex against the same VMObject despite potentially being mapped at different virtual addresses. --- Kernel/API/Syscall.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Kernel/API') diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index f236616c41..26a14416d1 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -310,10 +310,15 @@ struct SC_getpeername_params { }; struct SC_futex_params { - const i32* userspace_address; + u32* userspace_address; int futex_op; - i32 val; - const timespec* timeout; + u32 val; + union { + const timespec* timeout; + u32 val2; + }; + u32* userspace_address2; + u32 val3; }; struct SC_setkeymap_params { -- cgit v1.2.3