sched: add current_task(), current_thread(), and preempt_disable/enable()

This commit is contained in:
2023-03-28 21:39:59 +01:00
parent e0e6f4a9ae
commit 7d003da960
6 changed files with 65 additions and 3 deletions

View File

@@ -77,3 +77,8 @@ task_t *task_from_pid(unsigned int pid)
spin_unlock_irqrestore(&task_list_lock, flags);
return t;
}
task_t *current_task(void)
{
return current_thread()->tr_parent;
}