[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

getcf Kernel Service


Retrieves a free character buffer.


#include <sys/types.h>
#include <sys/errno.h>
#include <cblock.h
struct cblock *getcf ( )


The getcf kernel service retrieves a character buffer from the list of available ones and returns that buffer's address. The returned character buffer is pinned. If you use the getcf service to get a character buffer, be sure to free the space when you have finished using it. The buffers received from the getcf service should be freed by using the putcf kernel service.

Before starting the getcf service, the caller should request enough clist resources by using the pincf kernel service. The proper use of the getcf service ensures that there are sufficient pinned buffers available to the caller.

If the getcf service indicates that there is no available character buffer, the waitcfree service can be called to wait until a character buffer becomes available.

The getcf service has no parameters.

Execution Environment

The getcf kernel service can be called from either the process or interrupt environment.

Return Values

Upon successful completion, the getcf service returns the address of the allocated character buffer.

A null pointer indicates no buffers are available.

Implementation Specifics

The getcf kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The pincf kernel service, putcf kernel service, waitcfree kernel service.

I/O Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

[ Previous | Next | Contents | Home | Search ]