DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

putq(D3str)


putq -- put a message on a queue

Synopsis

   #include <sys/stream.h>
   #include <sys/ddi.h>
   

int putq(queue_t *q, mblk_t *bp);

Description

putq is used to put messages on a queue after the put(D2str) routine has finished processing the message. The message is placed after any other messages of the same priority, and flow control parameters are updated. The queue's service routine is scheduled if it has not been disabled by a previous call to noenable(D3str), or if the message being enqueued has greater than normal priority (that is, it is not in band zero).

Arguments


q
Pointer to the queue.

bp
Pointer to the message.

Return values

putq returns 1 on success and 0 on failure.

Usage

putq can fail if there is not enough memory to allocate the accounting data structures used with messages whose priority bands are greater than zero.

Context

Base or Interrupt.

Synchronization constraints

Does not block.

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(D3str)) when calling this function.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp

References

getq(D3str), insq(D3str), msgb(D4str), put(D2str), putbq(D3str), queue(D4str), rmvq(D3str), srv(D2str)

Examples

See datamsg(D3str) for an example of putq.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005