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

NAME

6       putq - put a message on a queue
7

SYNOPSIS

9       #include <sys/stream.h>
10
11
12
13       int putq(queue_t *q, mblk_t *bp);
14
15

INTERFACE LEVEL

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

PARAMETERS

20       q     Pointer to the queue to which the message is to be added.
21
22
23       bp    Message to be put on the queue.
24
25

DESCRIPTION

27       The  putq()  function is used to put messages on a driver's queue after
28       the module's put routine has finished processing the message. The  mes‐
29       sage  is placed after any other messages of the same priority, and flow
30       control parameters are updated. If QNOENB is not set, the service  rou‐
31       tine  is enabled. If no other processing is done, putq() can be used as
32       the module's put routine.
33

RETURN VALUES

35       The putq() function returns 1 on success and 0 on failure.
36
37
38       Upon failure, the caller should call freemsg(9F) to free the pointer to
39       the message block.
40

CONTEXT

42       The  putq() function can be called from user, interrupt, or kernel con‐
43       text.
44

EXAMPLES

46       See the datamsg(9F) function page for an example of putq().
47

SEE ALSO

49       datamsg(9F), putbq(9F), qenable(9F), rmvq(9F)
50
51
52       Writing Device Drivers
53
54
55       STREAMS Programming Guide
56
57
58
59SunOS 5.11                        16 Jan 2006                         putq(9F)
Impressum