STREAMS system calls
The STREAMS-related system calls are as follows:
open-
Open a Stream
close-
Close a Stream
read-
Read data from a Stream
write-
Write data to a Stream
ioctl-
Control a Stream
getmsg-
Receive a message at the Stream head
putmsg-
Send a message downstream
poll-
Notify the application program when selected events
occur on a Stream
pipe-
Create a channel that provides a communication path between multiple processes
A STREAMS device responds to the standard character I/O system calls,
such as read and write,
by turning the request into a message.
This feature ensures that STREAMS devices may be accessed
from the user level in
the same manner as non-STREAMS character devices.
However, additional system calls provide other
capabilities.
getmsg and putmsg
The putmsg and getmsg system calls enable a user process
to send and receive STREAMS messages, in the same form the messages have in
kernel modules and drivers.
read and write are not
designed to include the message boundaries necessary to encode messages.
The advantage of this capability is that a user process, as well as a
STREAMS module or driver, can implement a service interface.
poll
The poll system call allows a user process to monitor a number
of streams to detect expected I/O events.
Such events might be the
availability of a device for writing, input data arriving from a device,
a hangup occurring, an error being detected, or
the arrival of a priority message.
See
poll(2)
for more information.
Next topic:
Opening a STREAMS device file
Previous topic:
STREAMS mechanism
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004