pub fn sleep_interruptible(task: Arc<TaskControlBlock>)
Expand description
This function add a task to interruptible_queue,
but won’t take it out from ready_queue.
So you should make sure that the task won’t be presented in ready_queue.
In common cases, a task will be drop from ready_queue when it is scheduled,
and you can use take take_current_task()
to acquire the ownership of current TCB.
Attention
You should find a place to save Arc<TaskControlBlock>
of the task, or you would
be unable to use wake_interruptible()
to wake it up in the future.
This function won’t change task_status, you should change it manully to insure consistency.