Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void
- sched_task_activate_next(struct runtime *dev)
- {
- → struct task *t = NULL;
- → if (dev->task_curr) {
- → → task_set_state(dev->task_curr, TASK_STATE_PENDING);
- → → dd("current state set to PENDING");
- → }
- → t = dev->task_curr + sizeof(struct task);
- → if (t > (dev->tasks + (sizeof(struct task) * SCHED_MAX_TASKS)))
- → → t = dev->tasks;
- → if (t != NULL) {
- → → dd("next task finded");
- → → task_set_state(t, TASK_STATE_RUNNING);
- → → dd("next task marked as RUNNING");
- → → dev->task_curr = t;
- → → dd("next task activated");
- → }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement