'\" t .\" Title: __wake_up_sync_key .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "__WAKE_UP_SYNC_KEY" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" __wake_up_sync_key \- wake up threads blocked on a waitqueue\&. .SH "SYNOPSIS" .HP \w'void\ __wake_up_sync_key('u .BI "void __wake_up_sync_key(wait_queue_head_t\ *\ " "q" ", unsigned\ int\ " "mode" ", int\ " "nr_exclusive" ", void\ *\ " "key" ");" .SH "ARGUMENTS" .PP \fIq\fR .RS 4 the waitqueue .RE .PP \fImode\fR .RS 4 which threads .RE .PP \fInr_exclusive\fR .RS 4 how many wake\-one or wake\-many threads to wake up .RE .PP \fIkey\fR .RS 4 opaque value to be passed to wakeup targets .RE .SH "DESCRIPTION" .PP The sync wakeup differs that the waker knows that it will schedule away soon, so while the target thread will be woken up, it will not be migrated to another CPU \- ie\&. the two threads are \*(Aqsynchronized\*(Aq with each other\&. This can prevent needless bouncing between CPUs\&. .PP On UP it can prevent extra preemption\&. .PP It may be assumed that this function implies a write memory barrier before changing the task state if and only if any tasks are woken up\&. .SH "COPYRIGHT" .br