Printer-Friendly
Version
|
Next: Release CPU: thread_switch System
Up: 01-l4
Previous: Details of task_new Operation
- Task has a fixed number (128) of threads, initially all but one
inactive.
- Thread is activated by supplying a valid IP and SP.
- Thread inherits pager, excepter from activating thread.
- lthread_ex_regs() sets new and returns previous values
for
instruction pointer (IP), stack pointer (SP), exception handler,
pager.
- Supplying invalid value (-1) to any of those retains original
setting.
Can be used for:
- performing a user-level thread switch
(exchanging registers of running thread with saved ones);
- saving thread's context (by supplying only invalid parameters).
- Call terminates any pending or ongoing IPC.
Note: A thread cannot be ``deleted'', it is stopped by blocking.
Gernot Heiser
2002-08-07
|