enableok(D3)

enableok - allow a queue to be serviced

As shipped in IRIX 6.5. First release of IRIX 6.5.

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  }

REFERENCES
     noenable(D3), qenable(D3), queue(D4), srv(D2)