A new futex API
A new futex API
Posted Aug 15, 2023 4:38 UTC (Tue) by alison (subscriber, #63752)Parent article: A new futex API
Hopefully the ability to specify 8- and 16-bit futexes is a step to addressing the problems described in the 2016 talk Real-Time Summit 2016 meeting called "Futexes are cursed" (https://wiki.linuxfoundation.org/_media/realtime/events/r...) and the similarly themed next presentation called "Pthread Condvars: Posix Compliance and the PI Gap" (https://wiki.linuxfoundation.org/_media/realtime/events/r...). The conclusion then was there was not enough space in the existing futex either to entirely eliminate out-of-order wakeups or to implement priority inheritance. Letting userspace choose the size of futexes is great, as that means that embedded control systems should (eventually) be able to have PI and giant systems can still have many, many simultaneous futexes.
There's still the question of what libpthread will choose, but there are alternatives there as well (https://ossna2020.sched.com/event/cZIe/librtpi-conditiona...).
