'\" t .\" Title: threadgroup_lock .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "THREADGROUP_LOCK" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "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" threadgroup_lock \- lock threadgroup .SH "SYNOPSIS" .HP \w'void\ threadgroup_lock('u .BI "void threadgroup_lock(struct\ task_struct\ *\ " "tsk" ");" .SH "ARGUMENTS" .PP \fItsk\fR .RS 4 member task of the threadgroup to lock .RE .SH "DESCRIPTION" .PP Lock the threadgroup \fItsk\fR belongs to\&. No new task is allowed to enter and member tasks aren\*(Aqt allowed to exit (as indicated by PF_EXITING) or change \->group_leader/pid\&. This is useful for cases where the threadgroup needs to stay stable across blockable operations\&. .PP fork and exit paths explicitly call threadgroup_change_{begin|end}() for synchronization\&. While held, no new task will be added to threadgroup and no existing live task will have its PF_EXITING set\&. .PP \fBde_thread\fR does threadgroup_change_{begin|end}() when a non\-leader sub\-thread becomes a new leader\&. .SH "COPYRIGHT" .br