27 lines
2.0 KiB
Plaintext
27 lines
2.0 KiB
Plaintext
.TH streams_interrupt D3X
|
|
.SH NAME
|
|
\f4streams_interrupt\f1 \- synchronize interrupt-level function with STREAMS mechanism
|
|
.SH SYNOPSIS
|
|
.nf
|
|
\f4#include <strmp.h>
|
|
.sp
|
|
typedef void (*strintrfunc_t)(void *, void *, void *);
|
|
.sp
|
|
int streams_interrupt(strintrfunc_t \f1\f2func\f1\f4, void *\f1\f2a1\f1\f4, void *\f1\f2a2\f1\f4, void *\f1\f2a3\f1\f4);\f1
|
|
.fi
|
|
.SH DESCRIPTION
|
|
\f4streams_interrupt\f1 provides writers of STREAMS-based device drivers with an interface for synchronizing interrupt-level functions 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 interrupt level without first synchronizing with the underlying STREAMS mechanism.
|
|
.P
|
|
\f3Failure to properly synchronize could result in corrupted data structures and kernel panics.\f1
|
|
.P
|
|
\f4streams_interrupt\f1 attempts to synchronize with the STREAMS mechanism and execute \f2func\f1, before returning to the caller. If \f4streams_interrupt\f1 cannot immediately synchronize with the STREAMS mechanism, it will schedule \f2func\f1 for execution the next time synchronization can be achieved and will return to the caller. Since the time between calling \f4streams_interrupt\f1 and the time that \f2func\f1 is executed is indeterminate, it is not advisable to use \f2func\f1 to perform time-critical tasks (e.g., resetting hardware state, reading hardware data buffers, etc.).
|
|
.P
|
|
\f4streams_interrupt\f1 does not guarantee the spl level that \f2func\f1 will run at. It is the responsibility of the driver writer to explicitly set the desired spl level within \f2func\f1. However, the driver writer "must not" under any circumstances set the spl level to spl0 within \f2func\f1.
|
|
.SS Diagnostics
|
|
\f4streams_interrupt\f1 returns 1 if \f2func\f1 was executed, 0 if \f2func\f1 was scheduled for later execution, and \-1 on error.
|
|
.SS "See Also"
|
|
\f4STREAMS_TIMEOUT\f1(D3X), \f4untimeout\f1(D3), \f2
|
|
.xref DevDriver_PG 65886
|
|
IRIX Device Driver Programming Guide
|
|
\f1
|