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

NAME

6       putctl1 - send a control message with a one-byte parameter to a queue
7

SYNOPSIS

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

INTERFACE LEVEL

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

PARAMETERS

20       q       Queue to which the message is to be sent.
21
22
23       type    Type of message.
24
25
26       p       One-byte parameter.
27
28

DESCRIPTION

30       The  putctl1()  function,  like  putctl(9F), tests the type argument to
31       make sure a data type has not been specified, and attempts to  allocate
32       a  message  block. The p parameter can be used, for example, to specify
33       how long the delay will be when  an  M_DELAY  message  is  being  sent.
34       putctl1()  fails if type is M_DATA, M_PROTO, or M_PCPROTO, or if a mes‐
35       sage block cannot be allocated.  If  successful,  putctl1()  calls  the
36       put(9E)  routine  of the queue pointed to by q with the newly allocated
37       and initialized message.
38

RETURN VALUES

40       On success, 1 is returned. 0 is returned if type is a data type, or  if
41       a message block cannot be allocated.
42

CONTEXT

44       The  putctl1()  function  can be called from user, interrupt, or kernel
45       context.
46

EXAMPLES

48       See the putctl(9F) function page for an example of putctl1().
49

SEE ALSO

51       put(9E), allocb(9F), datamsg(9F), putctl(9F), putnextctl1(9F)
52
53
54       Writing Device Drivers
55
56
57       STREAMS Programming Guide
58
59
60
61SunOS 5.11                        16 Jan 2006                      putctl1(9F)
Impressum