sched

Task state and queues

  1. create wait_queue_t with DECLARE_WAITQUEUE().
  2. call add_wait_queue()/__add_wait_queue() to add the task to a wait queue
  3. set the state of task to TASK_INTERRUPTIBLE
  4. call schedule() to switch contexts and schedule() will call deactivate_task() to remove the task from a run queue
  1. call try_to_wake_up()
comments powered by Disqus