5 ms·
The WTF::ParkingLot example is interesting because it shows that you don't actually need futexes in the kernel to implement them efficiently; you just need some
by senderista 1y ago
The WTF::ParkingLot example is interesting because it shows that you don't actually need futexes in the kernel to implement them efficiently; you just need something like a spinlock (with sane backoff!) to guard the userspace wait queue and a per-thread eventfd to wake up waiters.
- saagarjha 1y agoIt gives you an implementation. The implementation does not have to be ideal, though.
- gpderetta 1y agoYes, you can do a good futex impression in userspace and add any missing functionality you need. Most importantly for webkit, I think, you get portability. The advantage of futex provided by the kernel is ABI stability and cross process support.