Schedules a function to be called after a specified interval.
The timeout utility schedules the function pointed to by the func parameter to be called with the arg parameter after the number of timer ticks specified by the ticks parameter. Multiple pending calls to the timeout utility with the same func and arg parameters are allowed. The function called by the timeout utility must adhere to the same restrictions as a driver interrupt handler. It must not sleep.
On multiprocessor systems, the function called by the timeout utility should be interrupt-safe. Otherwise, the STR_QSAFETY flag must be set when installing the module or driver with the str_install utility.
This utility is part of STREAMS Kernel Extension.
Item | Description |
---|---|
func | Indicates the function to be called. The function is declared
as follows:
|
arg | Indicates the parameter to supply to the function specified by the func parameter. |
ticks | Specifies the number of timer ticks that must occur before the function specified by the func parameter is called. Many timer ticks can occur every second. |
The timeout utility returns an integer that identifies the request. This value may be used to withdraw the time-out request by using the untimeout utility. If the timeout table is full, the timeout utility returns a value of 0 and the request is not registered.
The timeout utility may be called from either the process or interrupt environment.