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

getcb Kernel Service

Purpose

Removes the first buffer from a character list and returns the address of the removed buffer.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <cblock.h>
struct cblock *getcb 
(header)
struct clist *header;

Parameter

header Specifies the address of the clist structure that describes the character list.

Description

Attention: The caller of the getcb service must ensure that the character list is pinned. This includes the clist header and all the cblock character buffers. Character buffers acquired from the getcf service are pinned. Otherwise, the system may crash.

The getcb kernel service returns the address of the character buffer at the start of the character list and removes that buffer from the character list. The user must free the buffer with the putcf service when finished with it.

Execution Environment

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

Return Values

A null address indicates the character list is empty.

The getcb service returns the address of the character buffer at the start of the character list when the character list is not empty.

Implementation Specifics

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

Related Information

The getcf kernel service.

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


[ Previous | Next | Contents | Home | Search ]