1
0
Files
irix-657m-src/eoe/man/manD/STREAMS_TIMEOUT.d3x
2022-09-29 17:59:04 +03:00

29 lines
2.2 KiB
Plaintext

.TH STREAMS_TIMEOUT D3X
.SH NAME
\f4STREAMS_TIMEOUT\f1 \- synchronize timeout with STREAMS mechanism
.SH SYNOPSIS
\f4#include <strmp.h>
.sp
toid_t STREAMS_TIMEOUT(strtimeoutfunc_t \f1\f2func\f1\f4, void *\f1\f2arg\f1\f4, int \f1\f2time\f1\f4);\f1
.br
\f4toid_t STREAMS_TIMEOUT1(strtimeoutfunc_t \f1\f2func\f1\f4, void *\f1\f2arg\f1\f4, int \f1\f2time\f1\f4, void *\f1\f2arg1\f1\f4);\f1
.br
\f4toid_t STREAMS_TIMEOUT2(strtimeoutfunc_t \f1\f2func\f1\f4, void *\f1\f2arg\f1\f4, int \f1\f2time\f1\f4, void *\f1\f2arg1\f1\f4, void *\f1\f2arg2\f1\f4);\f1
.SH DESCRIPTION
The \f4STREAMS_TIMEOUT\f1 macros provide writers of STREAMS device drivers and modules with an interface for synchronizing timeouts with the STREAMS mechanism on multi-processor IRIX systems. Under IRIX, it is not permitted to call STREAMS interface routines (e.g., \f4allocb\f1(), \f4putq\f1(), \f4qenable\f1()) or otherwise manipulate STREAMS data structures from a function called via a timeout without first synchronizing with the underlying STREAMS mechanism.
.P
\f3Failure to properly synchronize could result in corrupted data structures and kernel panics.\f1
.P
The \f4STREAMS_TIMEOUT\f1 interfaces arrange for \f2func\f1 to be called in \f2time\f1/HZ seconds, and guarantee that it will be properly synchronized with the STREAMS mechanism.
.P
One, two or three arguments may be passed to \f2func\f1 by using \f2STREAMS_TIMEOUT\f1, \f2STREAMS_TIMEOUT1\f1 or \f2STREAMS_TIMEOUT2\f1 respectively.
.P
The \f4STREAMS_TIMEOUT\f1 interfaces do not guarantee the spl level that \f2func\f1 will run at. It is the responsibility of the driver or module writer to explicitly set the desired spl level within \f2func\f1. However, the driver or module writer "must not" under any circumstances set the spl level to spl0 within \f2func\f1.
.SS Diagnostics
The \f4STREAMS_TIMEOUT\f1 interfaces return a positive \f2toid_t\f1 on success. This \f2toid_t\f1 value may be used by a subsequent call to \f4untimeout\f1() to cancel the timeout. If an error is detected while setting the timeout, a \f2toid_t\f1 of 0 will be returned and no timeout will be set.
.SS "See Also"
\f4streams_interrupt\f1(D3X), \f4untimeout\f1(D3), \f2
.xref DevDriver_PG 65886
IRIX Device Driver Programming Guide
\f1