Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man9f/qreply.9f
Real path: /usr/share/man/man9f/qreply.9f
Zurück
'\" te .\" Copyright (c) 1989, AT&T. All rights reserved. .\" Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. .TH qreply 9F "16 Jan 2006" "Oracle Solaris 11.4" "Kernel Functions" .SH NAME qreply \- send a message on a stream in the reverse direction .SH SYNOPSIS .LP .nf #include <sys/stream.h> \fBvoid\fR \fBqreply\fR(\fBqueue_t *\fR\fIq\fR, \fBmblk_t *\fR\fImp\fR); .fi .SH INTERFACE LEVEL .sp .LP Architecture independent level 1 (DDI/DKI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIq\fR\fR .ad .RS 6n .rt Pointer to the queue. .RE .sp .ne 2 .mk .na \fB\fImp\fR\fR .ad .RS 6n .rt Pointer to the message to be sent in the opposite direction. .RE .SH DESCRIPTION .sp .LP The \fBqreply()\fR function sends messages in the reverse direction of normal flow. That is, \fBqreply(\fR\fIq\fR\fB,\fR \fImp\fR\fB)\fR is equivalent to \fBputnext(OTHERQ(\fR\fIq\fR\fB),\fR \fImp\fR\fB)\fR. .SH CONTEXT .sp .LP The \fBqreply()\fR function can be called from user, interrupt, or kernel context. .SH EXAMPLES .LP \fBExample 1\fR Canonical Flushing Code for STREAMS Drivers. .sp .LP This example depicts the canonical flushing code for STREAMS drivers. Assume that the driver has service procedures so that there may be messages on its queues. See \fBsrv\fR(9E). Its write-side put procedure handles \fBM_FLUSH\fR messages by first checking the \fBFLUSHW\fR bit in the first byte of the message, then the write queue is flushed (line 8) and the \fBFLUSHW\fR bit is turned off (line 9). See \fBput\fR(9E). If the \fBFLUSHR\fR bit is on, then the read queue is flushed (line 12) and the message is sent back up the read side of the stream with the \fBqreply()\fR function (line 13). If the \fBFLUSHR\fR bit is off, then the message is freed (line 15). See the example for \fBflushq\fR(9F) for the canonical flushing code for modules. .sp .in +2 .nf 1 xxxwput(q, mp) 2 queue_t *q; 3 mblk_t *mp; 4 { 5 switch(mp->b_datap->db_type) { 6 case M_FLUSH: 7 if (*mp->b_rptr & FLUSHW) { 8 flushq(q, FLUSHALL); 9 *mp->b_rptr &= ~FLUSHW; 10 } 11 if (*mp->b_rptr & FLUSHR) { 12 flushq(RD(q), FLUSHALL); 13 qreply(q, mp); 14 } else { 15 freemsg(mp); 16 } 17 break; . . . 18 } 19 } .fi .in -2 .sp .SH SEE ALSO .sp .LP \fBput\fR(9E), \fBsrv\fR(9E), \fBOTHERQ\fR(9F), \fBflushq\fR(9F), \fBputnext\fR(9F) .sp .LP \fIWriting Device Drivers in Oracle Solaris 11.4\fR .sp .LP \fISTREAMS Programming Guide\fR