.TH put "" "" "Entry-Point Routine"
.PC "Receive a message from a queue"
.B "#include <sys/stream.h>"
.B "#include <sys/stropts.h>"
.B "#include <sys/types.h>"
.sp \n(pDu
Read Side:
\fBint \fIprefix\fBrput(\fIqueue\^\fB, \fImessage\^\fB)\fR
\fBqueue_t \fIqueue\^\fB; mblk_t \fImessage\^\fB;
.sp \n(pDu
Write Side:
\fBint \fIprefix\fBwput(\fIqueue\^\fB, \fImessage\^\fB)\fR
\fBqueue_t \fIqueue\^\fB; mblk_t \fImessage\^\fB;
.PP
.II rput
.II wput
The
.B put
routine passes
.I message
onto
.IR queue .
.PP
No driver or module can call a
.B put
routine directly; rather,
it should use the function
.B put()
to invoke it.
.PP
A
.B put
routine is designated
.I read
or
.IR write ,
depending upon the direction of message flow.
A module or driver must have a write
.B put
routine.
A module must have a read
.B put
routine, but a driver is not required to have it because its interrupt
handler can do that work instead.
.SH "See Also"
.B
datab,
entry-point routines,
flushband(),
flushq(),
msgb,
putctl(),
putctl1(),
putnext(),
putq(),
qreply(),
queue,
srv
.R
.SH Notes
This entry point is used only by the DDI/DKI interface.
Under this interface, it is required.
.PP
A
.B put
routine does not have user context,
and therefore cannot call any function that sleeps.
.PP
No locks should be held when passing messages to other queues in the stream.
.PP
Multiple copies of the same
.B put
routine for a given queue, as well as the service routine for the queue,
can be running concurrently.
Drivers and modules must synchronize access to their
private data structures accordingly.
.PP
DDI/DKI drivers cannot call
.B put
procedures directly.
They must now call the appropriate \*(ST utility function, e.g.,
.BR put() ,
.BR putnext() ,
.BR putctl() ,
.BR putnextctl() ,
or
.BR qreply() .
