Re:Practical Libc-free threading on Linux
by monocasa on Friday March 24, 2023 @10:15AM
(#35289341)
futex will do lock instructions for you in kernel space. It's non optimal to just jump to kernel space every time, but it should still at least be correct.
[ Parent
| on HN ]
A system call has even more overhead than the lock prefix!
True, but arguably this article constrains itself to the kernel-user boundary, where atomic instructions could be considered out of scope considering how the Linux syscall ABI is constructed.