Recovers from a failure of the allocb utility.
bufcall(size, pri, func, arg)
void (* func)();
The bufcall utility assists in the event of a block-allocation failure. If the allocb utility returns a null, indicating a message block is not currently available, the bufcall utility may be invoked.
The bufcall utility arranges for (*func)(arg) call to be made when a buffer of the number of bytes specified by the size parameter is available. The pri parameter is as described in the allocb utility. When the function specified by the func parameter is called, it has no user context. It cannot reference the u_area and must return without sleeping. The bufcall utility does not guarantee that the desired buffer will be available when the function specified by the func parameter is called since interrupt processing may acquire it.
On an unsuccessful return, the function specified by the func parameter will never be called. A failure indicates a temporary inability to allocate required internal data structures.
On multiprocessor systems, the function specified by the func parameter should be interrupt-safe. Otherwise, the STR_QSAFETY flag must be set when installing the module or driver with the str_install utility.
Note: The stream.h header file must be the last included header file of each source file using the stream library.
|size||Specifies the number of bytes needed.|
|pri||Specifies the relative importance of the allocated blocks to the module. The possible values are:|
|func||Specifies the function to be called.|
|arg||Specifies an argument passed to the function.|
The bufcall utility returns a value of 1 when the request is successfully recorded. Otherwise, it returns a value of 0.
This utility is part of STREAMS Kernel Extensions.
The allocb utility, unbufcall utility, mi_bufcall utility.
List of Streams Programming References and Understanding STREAMS Messages in AIX 5L Version 5.1 Communications Programming Concepts.
Understanding STREAMS Synchronization in AIX 5L Version 5.1 Communications Programming Concepts.