Provides a reliable alternative to the bufcall utility.
#include <pse/mi.h> #include <sys/stream.h>
void mi_bufcall (Queue, Size, Priority) queue_t *Queue; int Size; int Priortity;
The mi_bufcall utility provides a reliable alternative to the bufcall utility. The standard STREAMS bufcall utility is intended to be called when the allocb utility is unable to allocate a block for a message, and invokes a specified callback function (typically the qenable utility) with a given queue when a large enough block becomes available. This can cause system problems if the stream closes so that the queue becomes invalid before the callback function is invoked.
The mi_bufcall utility is a reliable alternative, as the queue is not deallocated until the call is complete. This utility uses the standard bufcall mechanism with its own internal callback routine. The callback routine either invokes the qenable utility with the specified Queue parameter, or simply deallocates the instance data associated with the stream if the queue has already been closed.
Note: The stream.h header file must be the last included header file of each source file using the stream library.
Queue | Specifies the queue which is to be passed to the qenable utility. |
Size | Specifies the required buffer size. |
Priority | Specifies the priority as used by the standard STREAMS bufcall mechanism. |
The mi_bufcall utility is part of STREAMS kernel extensions.
List of Streams Programming References in AIX Version 4.3 Communications Programming Concepts .
STREAMS Overview in AIX Version 4.3 Communications Programming Concepts .
The bufcall utility, mi_close_comm utility, mi_next_ptr utility, mi_open_comm utility.