futex

How are threads/processes parked and woken in Linux, prior to futex?

守給你的承諾、 提交于 2019-11-29 08:40:55
Before the futex system calls existed in Linux, what underlying system calls were used by threading libraries like pthreads to block/sleep a thread and to subsequently wake those threads from userland? For example, if a thread tries to acquire a mutex, the userland implementation will block the thread (perhaps after a short spinning interval), but I can't find the syscalls that are used for this (other than futex which are a relatively recent creation). Before futex and current implementation of pthreads for Linux, the NPTL (require kernel 2.6 and newer), there were two other threading