CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2017/04/28 07:50:55
Modified files:
sys/conf : files
sys/kern : init_main.c kern_pledge.c syscalls.master
sys/sys : proc.h
Added files:
sys/kern : sys_futex.c
sys/sys : futex.h
Log message:
Add futex(2) syscall based on a sane subset of its Linux equivalent.
The syscall is marked NOLOCK and only FUTEX_WAIT grabs the KERNEL_LOCK()
because of PCATCH and the signal nightmare.
Serialization of threads is currently done with a global & exclusive
rwlock.
Note that the current implementation still use copyin(9) which is not
guaranteed to be atomic. Committing now such that remaining issues can
be addressed in-tree.
With inputs from guenther@, kettenis@ and visa@.
ok deraadt@, visa@