[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Communications Technical Reference, Volume 2

mi_bufcall Utility

Purpose

Provides a reliable alternative to the bufcall utility.

Syntax

#include <pse/mi.h>
#include <sys/stream.h>
void mi_bufcall (Queue, Size, Priority)
queue_t *Queue;
int Size;
int Priortity;

Description

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.

Parameters

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.

Implementation Specifics

The mi_bufcall utility is part of STREAMS kernel extensions.

Related Information

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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]