News for hackers. Stuff that matters.
Re:Without the Futex, It's Futile by senderista on Tuesday August 19, 2025 @07:39PM (#44957274)
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.
Re:Without the Futex, It's Futile by saagarjha on Wednesday August 20, 2025 @03:45AM (#44959651)
It gives you an implementation. The implementation does not have to be ideal, though.
Re:Without the Futex, It's Futile by gpderetta on Wednesday August 20, 2025 @08:21AM (#44961234)
Yes, 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.