.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "FINISH_TASK_SWITCH" "9" "09 October 2005" "" "" .SH NAME finish_task_switch \- clean up after a task-switch .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp void finish_task_switch (runqueue_t * \fIrq\fB, task_t * \fIprev\fB); \fR .SH "ARGUMENTS" .TP \fB\fIrq\fB\fR -- undescribed -- .TP \fB\fIprev\fB\fR the thread we just switched away from. .SH "DESCRIPTION" .PP finish_task_switch must be called after the context switch, paired with a prepare_task_switch call before the context switch. finish_task_switch will reconcile locking set up by prepare_task_switch, and do any other architecture-specific cleanup actions. .PP Note that we may have delayed dropping an mm in \fBcontext_switch\fR\&. If so, we finish that here outside of the runqueue lock. (Doing it with the lock held can cause deadlocks; see \fBschedule\fR for details.)