Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

bcanput(9r) [osf1 man page]

bcanput(9r)															       bcanput(9r)

NAME
bcanput - STREAMS: Tests for flow control in a specified priority band SYNOPSIS
#include <sys/stream.h> int bcanput( queue_t *message_queue, unsigned char pri ); ARGUMENTS
Specifies a pointer to the message queue. The typedef queue_t is an alternate name for struct queue_entry *. Specifies the priority of the message. DESCRIPTION
The bcanput interface, like the canput interface, searches through the stream (starting at the message queue identified by the mes- sage_queue argument) until it finds a queue that contains a service interface where the message can be enqueued or until it reaches the end of the stream. If bcanput finds a service interface in a queue, it tests the queue to determine if there is space in the queue to accommo- date a message. If the queue is full, bcanput sets the q_flag member of the queue_entry structure pointer (the message queue) to the con- stant QWANTW to back-enable the caller's service interface. If the pri argument is zero(0), bcanput calls the canput interface, which performs the task of checking for space in the message queue. NOTES
You are responsible for both testing a queue with bcanput and not placing a message on the queue if bcanput fails. RETURN VALUES
The bcanput interface returns a value of 1 if a message of priority pri can be placed on the message queue, or if the band does not yet exist on the queue. The interface returns a value of zero(0) if the priority band is flow-controlled. SEE ALSO
Kernel Routines: canput(9r), putbq(9r), putnext(9r) Programmer's Guide: STREAMS bcanput(9r)

Check Out this Related Man Page

bcanput(9F)						   Kernel Functions for Drivers 					       bcanput(9F)

NAME
bcanput - test for flow control in specified priority band SYNOPSIS
#include <sys/stream.h> int bcanput(queue_t *q, unsigned char pri); INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI). PARAMETERS
q Pointer to the message queue. pri Message priority. DESCRIPTION
bcanput() searches through the stream (starting at q) until it finds a queue containing a service routine where the message can be enqueued, or until it reaches the end of the stream. If found, the queue containing the service routine is tested to see if there is room for a message of priority pri in the queue. If pri is 0, bcanput() is equivalent to a call with canput(9F). canputnext(q) and bcanputnext(q, pri) should always be used in preference to canput(q->q_next) and bcanput(q->q_next, pri) respectively. RETURN VALUES
1 If a message of priority pri can be placed on the queue. 0 If the priority band is full. CONTEXT
bcanput() can be called from user or interrupt context. SEE ALSO
bcanputnext(9F), canput(9F), canputnext(9F), putbq(9F), putnext(9F) Writing Device Drivers STREAMS Programming Guide WARNINGS
Drivers are responsible for both testing a queue with bcanput() and refraining from placing a message on the queue if bcanput() fails. SunOS 5.10 11 Apr 1991 bcanput(9F)
Man Page

4 More Discussions You Might Find Interesting

1. IP Networking

message queue problem

I am sending and retriving the message to the queue the problem is after retrieving the message can i see what is there in my message queue. (actually in my application i am encountring some garbage value) so i want to retieve this garbage value and also want to know its size how... (0 Replies)
Discussion started by: ramneek
0 Replies

2. UNIX for Dummies Questions & Answers

Sending a structure through a message queue

Hi, I browsed thru the previous posts and couldnt find a solution for my problem. Hence I decided to post it. I have a buffer array that I want to send thru a message queue. The array consists of a header structure and a payload structure memcopied to it. When I print the contents of the... (1 Reply)
Discussion started by: zeebie
1 Replies

3. AIX

Move Xml files from AIX machine to message queue.

Hi, Im new to message queue... I need to move the xml files from the AIX server to the message queue. Please help me out to write the code.. Thanks, Mohana Krishnan (0 Replies)
Discussion started by: krishnan_6015@y
0 Replies

4. Shell Programming and Scripting

Move xml files from unix to message queue.

Hi, I need to move the XML files from the UNIX to the message queue. Please help me out to write the code.. Thanks, Mohana Krishnan (0 Replies)
Discussion started by: krishnan_6015@y
0 Replies