.\" 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 "SCHEDULE_TIMEOUT" "" "06 October 2005" "" "" .SH NAME schedule_timeout \- sleep until timeout .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp signed long schedule_timeout (signed long \fItimeout\fB); \fR .SH "ARGUMENTS" .TP \fB\fItimeout\fB\fR timeout value in jiffies .SH "DESCRIPTION" .PP Make the current task sleep until \fItimeout\fR jiffies have elapsed. The routine will return immediately unless the current task state has been set (see \fBset_current_state\fR). .PP You can set the task state as follows - .PP TASK_UNINTERRUPTIBLE - at least \fItimeout\fR jiffies are guaranteed to pass before the routine returns. The routine will return 0 .PP TASK_INTERRUPTIBLE - the routine may return early if a signal is delivered to the current task. In this case the remaining time in jiffies will be returned, or 0 if the timer expired in time .PP The current task state is guaranteed to be TASK_RUNNING when this routine returns. .PP Specifying a \fItimeout\fR value of MAX_SCHEDULE_TIMEOUT will schedule the CPU away without a bound on the timeout. In this case the return value will be MAX_SCHEDULE_TIMEOUT\&. .PP In all cases the return value is guaranteed to be non-negative.