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

NAME

6       put - call a STREAMS put procedure
7

SYNOPSIS

9       #include <sys/stream.h>
10       #include <sys/ddi.h>
11
12
13
14       void put(queue_t *q, mblk_t *mp);
15
16

INTERFACE LEVEL

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

PARAMETERS

21       q      Pointer to a STREAMS queue.
22
23
24       mp     Pointer to message block being passed into queue.
25
26

DESCRIPTION

28       put()  calls  the  put procedure ( put(9E) entry point) for the STREAMS
29       queue specified by q, passing it the message block referred to  by  mp.
30       It  is  typically used by a driver or module to call its own put proce‐
31       dure.
32

CONTEXT

34       put() can be called from a STREAMS module or driver put or service rou‐
35       tine,  or  from  an  associated interrupt handler, timeout, bufcall, or
36       esballoc call-back. In the latter cases, the calling code must  guaran‐
37       tee the validity of the q argument.
38
39
40       Since put() may cause re-entry of the module (as it is intended to do),
41       mutexes or other locks should not be held across calls to  it,  due  to
42       the  risk  of  single-party deadlock (put(9E), putnext(9F), putctl(9F),
43       qreply(9F)). This function is provided as a DDI/DKI conforming replace‐
44       ment for a direct call to a put procedure.
45

SEE ALSO

47       put(9E),  freezestr(9F),  putctl(9F),  putctl1(9F),  putnext(9F),  put‐
48       nextctl(9F), putnextctl1(9F), qprocson(9F), qreply(9F)
49
50
51       Writing Device Drivers
52
53
54        STREAMS Programming Guide
55

NOTES

57       The caller cannot have the stream frozen when  calling  this  function.
58       See  freezestr(9F).
59
60
61       DDI/DKI  conforming modules and drivers are no longer permitted to call
62       put procedures directly, but must call through the appropriate  STREAMS
63       utility  function,  for  example, put(9E), putnext(9F), putctl(9F), and
64       qreply(9F). This function is provided as a DDI/DKI conforming  replace‐
65       ment for a direct call to a put procedure.
66
67
68       The  put()  and  putnext() functions should be called only after qproc‐
69       son() is finished.
70
71
72
73SunOS 5.11                        28 Apr 1992                          put(9F)
Impressum