qprocson(9F)
NAME
qprocson, qprocsoff − disable, enable put and service routines
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
void qprocson(queue_t ∗q);
void qprocsoff(queue_t ∗q);
ARGUMENTS
q Pointer to the RD side of a STREAMS queue pair.
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
DESCRIPTION
qprocson() enables the put and service routines of the driver or module whose read queue is pointed to by q. Threads cannot enter the module instance through the put and service routines while they are disabled.
qprocson() must be called by the open routine of a driver or module before returning, and after any initialization necessary for the proper functioning of the put and service routines.
qprocsoff() must be called by the close routine of a driver or module before returning, and before deallocating any resources necessary for the proper functioning of the put and service routines. It also removes the queue’s service routines from the service queue, and blocks until any pending service processing completes.
The module or driver instance is guaranteed to be single-threaded before qprocson() is called and after qprocsoff() is called, except for threads executing asynchronous events such as interrupt handlers and callbacks, which must be handled separately.
CONTEXT
These routines may be called from any STREAMS open, close, put or service routine as well as interrupt handlers, callouts and call-backs.
NOTES
The caller may not have the STREAM frozen during either of these calls.
SEE ALSO
SunOS 5.1 — Last change: 28 Apr 1992