streams_interrupt(D3X)streams_interrupt(D3X)NAMEstreams_interrupt - synchronize interrupt-level function with STREAMS
mechanism
SYNOPSIS
#include <strmp.h>
typedef void (*strintrfunc_t)(void *, void *, void *);
int streams_interrupt(strintrfunc_t func, void *a1, void *a2, void *a3);
DESCRIPTIONstreams_interrupt 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., allocb(), putq(),
qenable()) or otherwise manipulate STREAMS data structures from interrupt
level without first synchronizing with the underlying STREAMS mechanism.
Failure to properly synchronize could result in corrupted data structures
and kernel panics.
streams_interrupt attempts to synchronize with the STREAMS mechanism and
execute func, before returning to the caller. If streams_interrupt cannot
immediately synchronize with the STREAMS mechanism, it will schedule func
for execution the next time synchronization can be achieved and will
return to the caller. Since the time between calling streams_interrupt
and the time that func is executed is indeterminate, it is not advisable
to use func to perform time-critical tasks (e.g., resetting hardware
state, reading hardware data buffers, etc.).
streams_interrupt does not guarantee the spl level that func will run at.
It is the responsibility of the driver writer to explicitly set the
desired spl level within func. However, the driver writer "must not"
under any circumstances set the spl level to spl0 within func.
Diagnostics
streams_interrupt returns 1 if func was executed, 0 if func was scheduled
for later execution, and -1 on error.
See Also
STREAMS_TIMEOUT(D3X), untimeout(D3), IRIX Device Driver Programming Guide
Page 1