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

putcb Kernel Service

Purpose

Places a character buffer at the end of a character list.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <cblock.h>
void putcb (p, header)
struct cblock *p;
struct clist *header;

Parameters

p Specifies the address of the character buffer to place on the character list.
header Specifies the address of the clist structure that describes the character list.

Description

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

The putcb kernel service places the character buffer pointed to by the p parameter on the end of the character list specified by the header parameter. Before calling the putcb service, you must load this new buffer with characters and set the c_first and c_last fields in the cblock structure. The p parameter is the address returned by either the getcf or the getcb service.

Execution Environment

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

Return Values

0 Indicates successful completion.
-1 Indicates that the character list is full and no more buffers are available.

Implementation Specifics

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

Related Information

The getcb kernel service, getcf kernel service, pincf kernel service, putcf kernel service, putcfl kernel service, waitcfree kernel service.

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


[ Previous | Next | Contents | Home | Search ]