Thread
- Multithreaded Programming (POSIX pthreads Tutorial)
- Multithreaded Programming Guide
- POSIX Threads(Pthreads) in Userland
- Kernel Thread
- Futex(fast userspace mutex
- Linux Kernel Documentation
- Futexes Are Tricky
- To 'up' a futex, execute the proper assembler instructions that will cause the host CPU to atomically increment the integer. Afterwards, check if it has in fact changed from 0 to 1, in which case there were no waiters and the operation is done.
- Waiting on a futex, to 'down' it, is the reverse operation. Atomically decrement the counter and check if it changed to 0, in which case the operation is done.
page revision: 16, last edited: 24 Mar 2011 13:17