[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2

putbq Utility

Purpose

Returns a message to the beginning of a queue.

Syntax


int
putbq(q, bp)
register queue_t * q;
register mblk_t * bp;

Description

The putbq utility puts the message pointed to by the bp parameter at the beginning of the queue pointed to by the q parameter, in a position in accordance with the message type. High-priority messages are placed at the head of the queue, followed by priority-band messages and ordinary messages. Ordinary messages are placed after all high-priority and priority-band messages, but before all other ordinary messages already on the queue. The queue is scheduled in accordance with the rules described in the putq utility. This utility is typically used to replace a message on the queue from which it was just removed.

This utility is part of STREAMS Kernel Extensions.

Note
A service procedure must never put a high-priority message back on its own queue, as this would result in an infinite loop.

Parameters

q Specifies the queue on which to place the message.
bp Specifies the message to place on the queue.

Return Values

The putbq utility returns a value of 1 on success. Otherwise, it returns a value of 0.

Related Information

The putq utility.

List of Streams Programming References and Understanding STREAMS Messages in AIX 5L Version 5.2 Communications Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]