[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

I_SETSIG streamio Operation

Purpose

Informs the stream head that the user wishes the kernel to issue the SIGPOLL signal when a particular event occurs on the stream.

Description

The I_SETSIG operation informs the stream head that the user wishes the kernel to issue the SIGPOLL signal (see the signal and sigset subroutines) when a particular event has occurred on the stream associated with the fildes parameter. The I_SETSIG operation supports an asynchronous processing capability in STREAMS. The value of the arg parameter is a bit mask that specifies the events for which the user should be signaled. It is the bitwise-OR of any combination of the following constants:

S_INPUT A nonpriority message has arrived on a stream-head read queue, and no other messages existed on that queue before this message was placed there. This is set even if the message is of zero length.
S_HIPRI A priority message is present on the stream-head read queue. This is set even if the message is of zero length.
S_OUTPUT The write queue just below the stream head is no longer full. This notifies the user that there is room on the queue for sending (or writing) data downstream.
S_MSG A STREAMS signal message that contains the SIGPOLL signal has reached the front of the stream-head read queue.

A user process may choose to be signaled only by priority messages by setting the arg bit mask to the value S_HIRPI.

Processes that wish to receive SIGPOLL signals must explicitly register to receive them using I_SETSIG. If several processes register to receive this signal for the same event on the same stream, each process will be signaled when the event occurs.

If the value of the arg parameter is 0, the calling process is unregistered and does not receive further SIGPOLL signals.

Error Codes

If unsuccessful, the errno global variable is set to one of the following values:

EINVAL The value for the arg parameter is invalid or 0 and process is not registered to receive the SIGPOLL signal.
EAGAIN The allocation of a data structure to store the signal request is unsuccessful.

Implementation Specifics

This operation is part of STREAMS Kernel Extensions.

Related Information

The poll subroutine, signal subroutine.

The streamio operations.

The I_GETSIG streamio operation.

Understanding STREAMS Monitoring in AIX Version 4.3 Communications Programming Concepts.


[ Previous | Next | Contents | Glossary | Home | Search ]