最終更新:2013-07-23 (火) 19:04:55 (3902d)
kernel/sched/core.c?__wake_up_common
Top / __wake_up_common
/* * The core wakeup function. Non-exclusive wakeups (nr_exclusive == 0) just * wake everything up. If it's an exclusive wakeup (nr_exclusive == small +ve * number) then we wake all the non-exclusive tasks and one exclusive task. * * There are circumstances in which we can try to wake a task which has already * started to run but is not in state TASK_RUNNING. try_to_wake_up() returns * zero in this (rare) case, and we handle it by continuing to scan the queue. */ static void __wake_up_common(wait_queue_head_t *q, unsigned int mode, int nr_exclusive, int wake_flags, void *key) { wait_queue_t *curr, *next; list_for_each_entry_safe(curr, next, &q->task_list, task_list) { unsigned flags = curr->flags; if (curr->func(curr, mode, wake_flags, key) && (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) break; } }
使ってる関数
関数名 | mode | nr | key |
wake_up | TASK_NORMAL | 1 | NULL |
wake_up_nr? | TASK_NORMAL | nr | NULL |
wake_up_all? | TASK_NORMAL | 0 | NULL |
wake_up_interruptible | TASK_INTERRUPTIBLE | 1 | NULL |
wake_up_interruptible_nr? | TASK_INTERRUPTIBLE | nr | NULL |
wake_up_interruptible_all? | TASK_INTERRUPTIBLE | 0 | NULL |