3 ms·
I'm talking about in general you can implement a 1-bit mutex. Regardless of how you sleep and wake, you make a side structure which contains the contended state
by throwawaylinux 4y ago
I'm talking about in general you can implement a 1-bit mutex. Regardless of how you sleep and wake, you make a side structure which contains the contended state of the mutex.
In the kernel of course you could just reuse your wait queue structure for that, which is exactly what bit mutexes do in Linux, but that's an implementation detail to my point.