Function pin_cpu

Source
pub fn pin_cpu() -> PinnedContext
Expand description

Pin the calling thread to one CPU.

This thread will never switch to a different CPU until the returned PinnedContext is dropped and it is not allowed to sleep.

See critical_enter and critical_exit on the PS4 for a reference. Beware that our implementation a bit different. The PS4 allow the thread to sleep but we don’t.