sched: add current_task(), current_thread(), and preempt_disable/enable()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user