next up previous contents
Next: Example Schedulers Up: Scheduler API Previous: Changing Thread Status   Contents

Resetting & Deleting thread

     oskit_u32_t (*delete_thread)(struct tcb *)

     oskit_u32_t (*reset_thread)(struct tcb *)
delete_thread() is called by the rtker when a thread exits to inform the scheduler of it's completion. The scheduler is free to remove the deleted thread from it's data structure. However for some cases it might not choose to do that. For example if the thread is periodic, for which it knows reset_thread is going to be called, it can continue to maintain the thread in it's data structure even after it's deleted.

reset_thread() is called by rtker to resetting , i.e restoring an already exited thread to it's initial state. It's more or less the same as new_thread but has been kept separate because the scheduler might choose a different implementation for the two. For example as explained above, the delete_thread call might not remove the deleted thread & for such a case the implementation of reset_thread() & new_thread() will be different.



Soumyadeb Mitra 2002-08-07