mirror of
https://github.com/justinian/jsix.git
synced 2025-12-09 16:04:32 -08:00
[kernel] Add (wip) futex syscalls
Add the syscalls j6_futex_wait and j6_futex_wake. Currently marking this as WIP as they need more testing. Added to support futexes: - vm_area and vm_space support for looking up physical address for a virtual address - libj6 mutex implementation using futex system calls
This commit is contained in:
@@ -43,6 +43,19 @@ interface syscalls [syscall] {
|
||||
param mask uint32 # The capability bitmask
|
||||
}
|
||||
|
||||
# Block waiting on a futex
|
||||
function futex_wait [static] {
|
||||
param address uint32* # Address of the futex value
|
||||
param current uint32 # Current value of the futex
|
||||
param timeout uint64 # Wait timeout in nanoseconds
|
||||
}
|
||||
|
||||
# Wake threads waiting on a futex
|
||||
function futex_wake [static] {
|
||||
param address uint32* # Address of the futex value
|
||||
param count uint64 # Number of threads to wake, or 0 for all
|
||||
}
|
||||
|
||||
# Testing mode only: Have the kernel finish and exit QEMU with the given exit code
|
||||
function test_finish [test] {
|
||||
param exit_code uint32
|
||||
|
||||
Reference in New Issue
Block a user