getcbp Kernel Service

Purpose

Retrieves multiple characters from a character buffer and places them at a designated address.

Syntax

#include <cblock.h>

int getcbp ( header,  dest,  n)
struct clist *header;
char *dest;
int n;

Parameters

Item Description
header Specifies the address of the clist structure that describes the character list.
dest Specifies the address where the characters obtained from the character list are to be placed.
n Specifies the number of characters to be read from the character list.

Description

Attention: The caller of the getcbp services 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 getcbp kernel service retrieves as many as possible of the n characters requested from the character buffer at the start of the character list. The getcbp service then places them at the address pointed to by the dest parameter.

Execution Environment

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

Return Values

The getcbp service returns the number of characters retrieved from the character buffer.