summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_futex.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use ktrreltimespec() as the timeout is relative, pointed by matthew@.mpi2019-02-061-2/+2
| | | | ok cheloha@
* Sprinkle a pinch of timerisvalid/timespecisvalid over the rest of sys/kerncheloha2019-01-231-2/+2
|
* futex(2): validate relative timeout before sleeping.cheloha2019-01-181-1/+3
| | | | | | | | Linux does validation. Document this new failure case as an EINVAL, like Linux. "stop waiting" deraadt
* Split the system-wide list of all futexes into process-specific listsvisa2018-08-301-12/+10
| | | | | | | | of private futexes and a shared list of shared futexes. This speeds up futex lookups. Tested by and OK krw@ OK mpi@
* Implement process-shared futexes. These are now the default implementation.kettenis2018-06-031-21/+52
| | | | | | | Introduce process-private futexs. These will bypass the uvm mapping lookup and should be slightly more efficient. ok visa@, mpi@
* Make futex(2) also return ECANCELED in case SA_RESTART was set.pirofti2018-04-241-2/+2
| | | | Prodded by and ok mpi@
* Do not pass a userland pointer to ktrabstimespec().mpi2018-01-081-2/+2
| | | | | Prevents an infinite pagefault/pmap_enter() loop when ktracing apps doing a lot of futex(2) calls like firefox & chrome.
* curproc access isn't necessarily as cheap as a local variable access,deraadt2017-12-191-3/+4
| | | | | so only get it once ok guenther
* New flag PR_RWLOCK for pool_init(9) makes the pool use rwlocks insteadguenther2017-08-131-3/+3
| | | | | | | of mutexes. Use this immediately for the pool_cache futex pools. Mostly worked out with dlg@ during e2k17 ok mpi@ tedu@
* Use copyin32(9) to atomically copy the futex from user space.kettenis2017-05-271-4/+11
| | | | | | | On !MULTIPROCESSOR kernels we still fall back on copyin(9), but that is fine. This will break m88k MULTIPROCESSOR kernels. ok deraadt@, mpi@, visa@
* Return ENOSYS for unsupported operation.mpi2017-04-301-4/+3
|
* Add futex(2) syscall based on a sane subset of its Linux equivalent.mpi2017-04-281-0/+287
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@