Commit Graph

3 Commits

Author SHA1 Message Date
Loïc Grégoire b9261c84de ke: optimize mutex
Optimize the mutex code in a few ways:

- Split the fast and slow paths into their own functions, inline the fast path.
- Raise IPL only when acquiring a turnstile lock.
- Avoid taking the turnstile lock if the "waiters" bit is not set.
- Do adaptive spinning only when the lock owner is running.
2026-10-24 16:12:30 -04:00
Loïc Grégoire 76147556a3 ke: make getting the current thread atomic 2026-10-23 23:47:23 -04:00
Loïc Grégoire 6a63714e6c all: rework source tree structure 2026-10-12 15:02:48 -04:00