Checks for an available buffer.
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.
This utility is part of STREAMS Kernel Extensions.
Item | Description |
---|---|
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. |
If the buffer is available, the testb utility returns a value of 1. Otherwise, it returns a value of 0.