3 ms·
If you really want to use a pure spinlock you'll either have to accept that worst-case behavior being worse than a mutex or you have to jump through a lot of ho
by the8472 7y ago
If you really want to use a pure spinlock you'll either have to accept that worst-case behavior being worse than a mutex or you have to jump through a lot of hoops (pinning threads, isolating cores, reassigning interrupts) to make sure you don't get descheduled. Because the scheduler won't know anything about priority inversions or even waiting threads, they all look runnable.