1qprocson(9F)             Kernel Functions for Drivers             qprocson(9F)
2
3
4

NAME

6       qprocson, qprocsoff - enable, disable put and service routines
7

SYNOPSIS

9       #include <sys/stream.h>
10       #include <sys/ddi.h>
11
12       void qprocson(queue_t *q);
13
14
15       void qprocsoff(queue_t *q);
16
17

INTERFACE LEVEL

19       Architecture independent level 1 (DDI/DKI).
20

PARAMETERS

22       q    Pointer to the RD side of a streams queue pair.
23
24

DESCRIPTION

26       The  qprocson()  enables  the put and service routines of the driver or
27       module whose read queue is pointed to by q. Threads  cannot  enter  the
28       module  instance  through  the  put and service routines while they are
29       disabled.
30
31
32       The qprocson() function must be called by the open routine of a  driver
33       or  module before returning, and after any initialization necessary for
34       the proper functioning of the put and service routines.
35
36
37       The qprocson() function must be called  before  calling  put(9F),  put‐
38       next(9F), qbufcall(9F), qtimeout(9F), qwait(9F), or qwait_sig(9F).
39
40
41       The  qprocsoff()  function  must  be  called  by the close routine of a
42       driver  or  module  before  returning,  and  before  deallocating   any
43       resources  necessary  for the proper functioning of the put and service
44       routines. It also removes the queue's service routines from the service
45       queue, and blocks until any pending service processing completes.
46
47
48       The  module  or  driver  instance  is  guaranteed to be single-threaded
49       before qprocson() is called and after qprocsoff() is called, except for
50       threads  executing  asynchronous  events such as interrupt handlers and
51       callbacks, which must be handled separately.
52

CONTEXT

54       These routines can be called from user, interrupt, or kernel context.
55

SEE ALSO

57       close(9E), open(9E),  put(9E),  srv(9E),  put(9F),  putnext(9F),  qbuf‐
58       call(9F), qtimeout(9F), qwait(9F), qwait_sig(9F)
59
60
61       Writing Device Drivers
62
63
64       STREAMS Programming Guide
65

NOTES

67       The caller may not have the stream frozen during either of these calls.
68
69
70
71SunOS 5.11                        16 Jan 2006                     qprocson(9F)
Impressum