STREAMS/UX for the HP 9000 Reference Manual

45
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
the put routine of the specified queue. putctl2 returns 0 if the type is
M_DATA, M_PROTO or M_PCPROTO, or if a message block cannot be
allocated. putctl2 returns 1 if it completes successfully.
putnextctl2
STREAMS/UX provides the additional utility putnextctl2. This utility can
be used to send a control message with a two-byte parameter to the next
queue in a stream. For example, putnextctl2 can send the new style of an
M_ERROR message, which is two bytes long, to the next queue in a stream.
int putnextctl2(q, type, p1, p2);
queue_t * q;
int type;
int p1;
int p2;
The q parameter is the queue from which the message is sent. The message
is sent to q->q_next. The type parameter is the message type. The p1 and
p2 parameters are the two bytes of data in the message. The putnextctl2
utility ensures that the type is not a data type. The utility also allocates a
message block, fills in the data, and calls the put routine of q->q_next.
putnextctl2 returns 0 if the type is M_DATA, M_PROTO, or M_PCPROTO,
or if a message block cannot be allocated. putnextctl2 returns 1 if it
completes successfully.
qprocson and qprocsoff
SVR4 MP STREAMS/UX provides qprocson and qprocsoff, which on a
multiprocessor system allows a module's put and service routines to run
concurrently with open and close. STREAMS/UX does not allow this much
parallelism. A module's or driver's put and service routines cannot run at the
same time as the open or close. Although STREAMS/UX does not run the
put or service routine in parallel with the open or close, it does queue any
requests to run the put or service routine. STREAMS/UX will process these
when open finishes. Also, if open or close sleeps, STREAMS/UX can run
the put and service routines while open or close are sleeping. However, a
put or service routine cannot do the wakeup on a sleeping open or close.
STREAMS/UX provides stubs which are no-ops for qprocson and qprocsoff
to make porting easier.