STREAMS/UX for the HP 9000 Reference Manual
37
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Changes to STREAMS/UX System Calls
Write Offset
A module or driver can send the stream head an M_SETOPTS message,
telling the STREAM head to put an offset in the beginning of the first data
block in a message sent by a putmsg call. STREAMS/UX will not put the
offset into the data block if the amount of memory required is greater than
the page size. See Chapter 5 of the SVR4.2 STREAMS manual for more
information.
select Modifications
STREAMS/UX supports the select system call for STREAMS/UX devices.
For information about the select system call, see the select(2) man page
delivered with the HP-UX core system.
The select system call does not provide as much information as poll. If
select returns an event for a STREAMS/UX device, the program can call
poll to get more information.
A select read event is returned if a poll event POLLRDNORM, POLLERR,
POLLNVAL or POLLHUP exists on the stream. In other words, a read
event is returned for the following conditions:
• a normal message is waiting to be read
• a read error exists at the stream head
• a write error exists at the stream head
• the stream is linked under a multiplexor
• a hang-up has occurred
A select write event is returned if a poll event POLLOUT, POLLWRNORM,
POLLERR, POLLNVAL, or POLLHUP exists on the STREAM. This
means that a write event is returned for the following conditions:
• normal data can be written without blocking because of flow control
• a read error exists at the stream head
• a write error exists at the stream head
• the stream is linked under a multiplexor
• a hang-up has occurred