-
- Downloads
sched: make the current cpu pointer a member of the thread struct
With the current implementation, where the current cpu is a thread-local variable, we cannot change the cpu pointer atomically during a context switch, as we cannot obtain a pointer to a thread-local variable before the thread has been run. By moving the cpu pointer to the thread structure, we can change it atomically by switching the thread-local base register (%fs on x64).
Loading
Please register or sign in to comment