1bcanput(9F)              Kernel Functions for Drivers              bcanput(9F)
2
3
4

NAME

6       bcanput - test for flow control in specified priority band
7

SYNOPSIS

9       #include <sys/stream.h>
10
11
12
13       int bcanput(queue_t *q, unsigned char pri);
14
15

INTERFACE LEVEL

17       Architecture independent level 1 (DDI/DKI).
18

PARAMETERS

20       q      Pointer to the message queue.
21
22
23       pri    Message priority.
24
25

DESCRIPTION

27       The  bcanput()  function  searches  through  the stream (starting at q)
28       until it finds a queue containing a service routine where  the  message
29       can  be  enqueued, or until it reaches the end of the stream. If found,
30       the queue containing the service routine is tested to see if  there  is
31       room for a message of priority pri in the queue.
32
33
34       If pri is 0, bcanput() is equivalent to a call with  canput(9F).
35
36
37       canputnext(q)  and  bcanputnext(q,pri) should always be used in prefer‐
38       ence to canput(q→q_next) and bcanput(q→q_next,pri) respectively.
39

RETURN VALUES

41       1    If a message of priority pri can be placed on the queue.
42
43
44       0    If the priority band is full.
45
46

CONTEXT

48       The bcanput() function can be called from user,  interrupt,  or  kernel
49       context.
50

SEE ALSO

52       bcanputnext(9F), canput(9F), canputnext(9F), putbq(9F), putnext(9F)
53
54
55       Writing Device Drivers
56
57
58       STREAMS Programming Guide
59

WARNINGS

61       Drivers  are  responsible  for  both testing a queue with bcanput() and
62       refraining from placing a message on the queue if bcanput() fails.
63
64
65
66SunOS 5.11                        16 Jan 2006                      bcanput(9F)
Impressum