1__WAKE_UP_SYNC_KEY(9) Driver Basics __WAKE_UP_SYNC_KEY(9)
2
3
4
6 __wake_up_sync_key - wake up threads blocked on a waitqueue.
7
9 void __wake_up_sync_key(wait_queue_head_t * q, unsigned int mode,
10 int nr_exclusive, void * key);
11
13 q
14 the waitqueue
15
16 mode
17 which threads
18
19 nr_exclusive
20 how many wake-one or wake-many threads to wake up
21
22 key
23 opaque value to be passed to wakeup targets
24
26 The sync wakeup differs that the waker knows that it will schedule away
27 soon, so while the target thread will be woken up, it will not be
28 migrated to another CPU - ie. the two threads are 'synchronized' with
29 each other. This can prevent needless bouncing between CPUs.
30
31 On UP it can prevent extra preemption.
32
33 It may be assumed that this function implies a write memory barrier
34 before changing the task state if and only if any tasks are woken up.
35
37Kernel Hackers Manual 2.6. November 2011 __WAKE_UP_SYNC_KEY(9)