1
0
Files
irix-657m-src/eoe/man/manD/WR.d3
2022-09-29 17:59:04 +03:00

70 lines
1.6 KiB
Plaintext

.if n .pH ddi.rm/d3/gen/WR @(#)WR 43.11 of 11/27/92
.\" Copyright 1992, 1991 UNIX System Laboratories, Inc.
.TH WR D3
.IX "\f4WR\fP(D3)"
.SH NAME
\f4WR\f1 \- get a pointer to the write queue
.SH SYNOPSIS
.nf
.na
.ft 4
#include <sys/stream.h>
#include <sys/ddi.h>
.sp 0.4
queue_t *WR(queue_t *\f2q\fP);
.ft 1
.ad
.fi
.SS Arguments
.RS 0
.IP "\f2q\f1" 10n
Pointer to the queue whose write queue is to be returned.
.RE
.SH DESCRIPTION
The \f4WR\f1 function accepts a queue pointer as an argument and
returns a pointer to the write queue of the same module.
.SS "Return Values"
The pointer to the write queue.
.SH USAGE
Note that when \f4WR\fP is passed a write queue pointer as an argument,
it returns a pointer to this write queue.
.SS Level
Base or Interrupt.
.SS "Synchronization Constraints"
Does not sleep.
.P
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
.SS Examples
.IX "\f4WR\fP(D3), example"
In a STREAMS \f4open\fP(D2) routine, the driver or module is passed
a pointer to the read queue.
The driver or module can store a
pointer to a private data structure in
the \f4q_ptr\f1 field of both the read and write queues if it
needs to identify the data structures from its \f4put\fP(D2)
or \f4srv\fP(D2) routines.
.P
.nf
.ft 4
.ps -1
.vs -1
1 extern struct xxx_dev[];
...
2 xxxopen(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *crp)
3 {
...
3 q->q_ptr = (caddr_t)&xxx_dev[getminor(*devp)];
4 WR(q)->q_ptr = (caddr_t)&xxx_dev[getminor(*devp)];
...
5 }
.vs
.ps
.ft 1
.fi
.SH REFERENCES
.na
\f4OTHERQ\fP(D3),
\f4RD\fP(D3)
.ad