STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
216
NAME
streams_timeout () – Schedule a timeout to execute a specified function after a specified time
delay.
SYNOPSIS
#include <sys/stream.h>
#include <sys/strenv.h>
toid_t *streams_timeout (timeout_fcn_t func, timeout_arg_t arg, int ticks, pl_t prilev, int
call_mp_timeout);
PARAMETERS
func
Function to be executed after a specified time interval.
arg
Argument passed to the timeout handler.
ticks
Number of ticks after which the function is to be executed.
prilev
Interrupt priority level at which the function will be called. The valid priority levels are
pltimeout, plstr, plhi and invpl.
call_mp_timeout
Set 1 to indicate that the caller is MP aware STREAMS module/driver.
DESCRIPTION
The streams_timeout() function executes the specified function func() after the time interval as specified
in ticks have expired. It returns an integer identification number. The streams_untimeout() function
cancels a timeout request using this identification number.
RETURN VALUES
streams_timeout() returns a non-zero identifier to be passed to streams_untimeout() function to cancel
the request, if the function was successfully scheduled for execution. If invalid interrupt priority levels are
passed, then streams_timeout() returns a zero.
CONSTRAINTS
streams_timeout() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user
lock order can be held across this call.