3 ms·
You can't have that with futexes. That would require a system call for every lock and unlock, not just for contended ones. It's a trade-off.
by cryptonector 4y ago
You can't have that with futexes. That would require a system call for every lock and unlock, not just for contended ones.
It's a trade-off.
- EdSchouten 4y agoThat’s not true. Just create a 32 or 64 bit futex, and use that to let threads write their thread ID into it. https://www.kernel.org/doc/Documentation/pi-futex.txt https://www.kernel.org/doc/Documentation/pi-futex.txt
- cryptonector 4y agoBut the whole point here is to have teeny tiny futexes.