#include <revolution/os.h>
typedef void (*OSSwitchThreadCallback)(OSThread* from, OSThread* to);
OSSwitchThreadCallback
OSSetSwitchThreadCallback( OSSwitchThreadCallback callback );
| callback | Callback function to call whenever a thread context switch occurs. Specify NULL to unregister the callback function. |
|---|
The previous thread switch callback.
Registers a specified callback function. This callback function is called whenever a thread context switch occurs.
callback takes 2 arguments. from is a pointer to the previously running thread. to is a pointer to the next running thread. If there is no thread ready to run, either from or to will be NULL.
Thread Functions, Thread Synchronization Functions, OSCancelThread, OSDetachThread, OSExitThread, OSIsThreadTerminated
2006/03/01 Initial version.
CONFIDENTIAL