Function Number | Function |
0x08 | End time slice |
0x20 | Stop thread |
0x21 | Start thread |
0x80 | Kill current task |
This ends a time slice, which does different things depending on the policy of the thread. For policy 0 and policy 3 threads ending the time slice does nothing because the scheduler will switch to the highest priority thread that's ready to run, which should be the same thread that just ended it's time slice. For policy 1 tasks the current time slice will end, the amount of time owed to the thread is reset to 0 and the thread is marked as 'up to date'. The length of time before the thread gets another time slice is determined by the threads 'period' setting. For policy 2 threads ending a time slice gives cpu time to other policy 2 threads, but if there's no other policy 2 threads it will return to the same thread that just ended it's time slice.
Input
None
Output
AL Status
This prevents a thread from getting any cpu time until it's started again (regardless of policy).
Input
EBX Task ID
Output
AL Status
Used to start a thread that was stopped with function 0x20.
Input
EBX Task ID
Output
AL Status
The function takes no parameters and never returns. Any resources allocated by a thread should be de-allocated before the thread calls this function.