-/**
- * Unregister all tasks.
- *
- * \param s The scheduler instance to shut down.
- *
- * This will cause \a schedule() to return immediately because both the
- * \a pre_select_list and the \a post_select_list are empty. This function
- * must be called from the post_select (rather than the pre_select) method.
- */
-void sched_shutdown(struct sched *s)
-{
- struct task *t, *tmp;
-
- list_for_each_entry_safe(t, tmp, &s->pre_select_list, pre_select_node) {
- t->error = -E_SCHED_SHUTDOWN;
- unregister_task(t);
- }
- list_for_each_entry_safe(t, tmp, &s->post_select_list, post_select_node) {
- t->error = -E_SCHED_SHUTDOWN;
- unregister_task(t);
- }
-}
-