最終更新:2013-07-23 (火) 21:34:02 (2579d)  

__wake_up
Top / __wake_up

wake up threads blocked on a waitqueue.

void __wake_up(wait_queue_head_t *q, unsigned int mode, int nr, void *key);

引数

  • q: the waitqueue
  • mode: which threads
  • nr_exclusive: how many wake-one or wake-many threads to wake up
  • key: is directly passed to the wakeup function

kernel/sched/core.c?

  • void __wake_up(wait_queue_head_t *q, unsigned int mode,
                            int nr_exclusive, void *key)
    {
            unsigned long flags;
    
            spin_lock_irqsave(&q->lock, flags);
            __wake_up_common(q, mode, nr_exclusive, 0, key);
            spin_unlock_irqrestore(&q->lock, flags);
    }

内部で呼んでいる関数

使ってる関数

関数名modenrkey
wake_upTASK_NORMAL1NULL
wake_up_nr?TASK_NORMALnrNULL
wake_up_all?TASK_NORMAL0NULL
wake_up_interruptibleTASK_INTERRUPTIBLE1NULL
wake_up_interruptible_nr?TASK_INTERRUPTIBLEnrNULL
wake_up_interruptible_all?TASK_INTERRUPTIBLE0NULL

関連

  • __wake_up_locked?
  • __wake_up_sync?