Source
- URL: https://x.com/raggi/status/2065865513608307103
- Author: James Tucker (@raggi)
- Posted: 2026-06-13 18:34:55
Branch
1/ @raggi
@NOTimothyLottes
nanosleep(0) will sleep for the timer slack
_mm_pause() if you want to avoid a context switch and keep your scheduler quantum
2/ @NOTimothyLottes
@raggi
I do that via inline asm to save power. This was more a comment on the cost of actually using the futex system call, need to be careful about the call frequency