[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Kernel and Subsystems, Volume 1

putcx Kernel Service

Purpose

Places a character on a character list.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/cblock.h>


int putcx ( c, header)
char c;
struct clist *header;

Parameters

c Specifies the character to place at the front of the character list.
header Specifies the address of the clist structure that describes the character list.

Description

The putcx kernel service puts the character specified by the c parameter at the front of the character list pointed to by the header parameter. The putcx service is identical to the putc service, except that it puts the character at the front of the list instead of at the end.

If the putcx service indicates that there are no more buffers available, the waitcfree service can be used to wait until a character buffer is available.

Note
The caller of the putcx 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.

Execution Environment

The putcx 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.

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 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]