2 ms·
I have used one bit spinlocks to protect the wait queue of a more sophisticated waiting primitive for an user-space[1] application. Adding to the queue and sig
by gpderetta 3y ago
I have used one bit spinlocks to protect the wait queue of a more sophisticated waiting primitive for an user-space[1] application. Adding to the queue and signalling all could be done lock-free, but lock-free removal of a waiter before a signal (which I needed to support) is quite complicated, and borrowing a bit from the wait list head field to encode a list-deleter spinlock was the best solution.
[1] one-thread per core, pinned, isolcpu, NO_HZ, etc. The usual.