enableok(D3) enableok(D3)
NAME
enableok - allow a queue to be serviced
SYNOPSIS
#include <sys/stream.h>
#include <sys/ddi.h>
void enableok(queue_t *q);
Arguments
q Pointer to the queue.
DESCRIPTION
The enableok function allows the service routine of the queue
pointed to by q to be rescheduled for service. It cancels the
effect of a previous use of the noenable(D3) function on q.
Return Values
None
USAGE
Level
Base or Interrupt.
Synchronization Constraints
Does not sleep.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
The caller cannot have the stream frozen [see freezestr(D3)]
when calling this function.
Examples
The qrestart routine uses two STREAMS functions to re-enable a
queue that has been disabled. The enableok function removes
the restriction that prevented the queue from being scheduled
when a message was enqueued. Then, if there are messages on
the queue, it is scheduled by calling qenable(D3).
1 void
2 qrestart(q)
3 queue_t *q;
4 {
5 enableok(q);
6 if (q->q_first)
7 qenable(q);
8 }
Copyright 1994 Novell, Inc. Page 1
enableok(D3) enableok(D3)
REFERENCES
noenable(D3), qenable(D3), queue(D4), srv(D2)
NOTICES
Portability
All processors
Applicability
ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp
Copyright 1994 Novell, Inc. Page 2