Package Overview

The Strm (Stream) package is a collection of kernel procedures concerned with the incoming and outgoing packet streams of processors and queues.

When a process is invoked by an interrupt, its input streams may contain packets (whether or not the process was invoked by a stream interrupt). In order to determine which streams contain packets, the KP op_strm_empty() can be used. This KP returns 1 if the specified stream is empty or 0 if the specified stream is not empty. Alternatively, the KP op_strm_pksize() can be used to determine the exact quantity of packets waiting in the specified stream (if packets have been sent to the stream using the quiet send or deliver mechanisms, multiple packets may be contained in an input stream).

Input streams can be connected to generators, processors, queues, or receivers. Queues have a special significance, because they may be executing passive queueing processes, and thus require an access interrupt to force the forwarding of a packet from the queue. In this type of configuration, the destination module determines when it should receive a packet from the queue and calls the KP op_strm_access(), which causes an access interrupt at the queue.

There are a number of KPs in the Strm package concerned with determining the number of streams and their connection status. These KPs are important when iterative operations need to be applied to multiple streams, but the executing process does not have built-in knowledge of the module fan-in or fan-out. The KPs op_strm_max_index_in() and op_strm_max_index_out() respectively return the highest indices for input and output streams, respectively. And the KP op_strm_connected() determines whether the specified stream is connected or not.