1enableok(9F) Kernel Functions for Drivers enableok(9F)
2
3
4
6 enableok - reschedule a queue for service
7
9 #include <sys/stream.h>
10 #include <sys/ddi.h>
11
12
13
14 void enableok(queue_t *q);
15
16
18 Architecture independent level 1 (DDI/DKI).
19
21 q A pointer to the queue to be rescheduled.
22
23
25 The enableok() function enables queue q to be rescheduled for service.
26 It reverses the effect of a previous call to noenable(9F) on q by turn‐
27 ing off the QNOENB flag in the queue.
28
30 The enableok() function can be called from user, interrupt, or kernel
31 context.
32
34 Example 1 Using emableok()
35
36
37 The qrestart() routine uses two STREAMS functions to restart a queue
38 that has been disabled. The enableok() function turns off the QNOENB
39 flag, allowing the qenable(9F) to schedule the queue for immediate pro‐
40 cessing.
41
42
43 1 void
44 2 qrestart(rdwr_q)
45 3 register queue_t *rdwr_q;
46 4 {
47 5 enableok(rdwr_q);
48 6 /* re-enable a queue that has been disabled */
49 7 (void) qenable(rdwr_q);
50 8 }
51
52
54 noenable(9F), qenable(9F)
55
56
57 Writing Device Drivers
58
59
60 STREAMS Programming Guide
61
62
63
64SunOS 5.11 16 Jan 2006 enableok(9F)