pid_t switchto_wait(timespec *timeout)
- Enter an 'unscheduled state', until our control is
reinitiated by another thread or external event (signal).
void switchto_resume(pid_t tid)
- Resume regular execution of tid
pid_t switchto_switch(pid_t tid)
- Synchronously transfer control to target sibling
thread, leaving the current thread unscheduled.
The key abstraction is switchto_switch, which explicitly transfers control to another thread, leaving the current thread quiescent. It's analogous to setcontext(3) or longjmp(3).
While I'm all for more options, and against deprecating commonly used functionality; the results I'm getting say that first class context switching support isn't really as important as we like to pretend.
wahern|7 years ago
The basic API (see page 17) consisted of:
The key abstraction is switchto_switch, which explicitly transfers control to another thread, leaving the current thread quiescent. It's analogous to setcontext(3) or longjmp(3).bgongfu|7 years ago