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

testb Utility

Purpose

Checks for an available buffer.

Syntax

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

Description

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.

Parameters

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

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.


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