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

testb Utility


Checks for an available buffer.


testb(size, pri)
register size;
uint pri;


The testb utility checks for the availability of a message buffer of the size specified in the size parameter without actually retrieving the buffer. A successful return value from the testb utility does not guarantee that a subsequent call to the allocb utility will succeed; for example, when an interrupt routine takes the buffers.


size Specifies the buffer size.
pri Specifies the relative importance of the allocated blocks to the module. The possible values are:

The pri parameter is currently unused and is maintained only for compatibility with applications developed prior to UNIX System V Release 4.0.

Return Values

If the buffer is available, the testb utility returns a value of 1. Otherwise, it returns a value of 0.

Implementation Specifics

This utility is part of STREAMS Kernel Extensions.

Related Information

The allocb utility.

List of Streams Programming References and Understanding STREAMS Flow Control in AIX Version 4.3 Communications Programming Concepts.

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