Places a character at the end of a character list.
#include <sys/types.h> #include <sys/errno.h> #include <cblock.h>
int putc (c, header) char c; struct clist *header;
|c||Specifies the character to place on the character list.|
|header||Specifies the address of the clist structure that describes the character list.|
Attention: The caller of the putc 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 also pinned. Otherwise, the system may crash.
The putc kernel service puts the character specified by the c parameter at the end of the character list pointed to by the header parameter.
If the putc service indicates that there are no more buffers available, the waitcfree service can be used to wait until a character block is available.
The putc kernel service can be called from either the process or interrupt environment.
|0||Indicates successful completion.|
|-1||Indicates that the character list is full and no more buffers are available.|
The putc kernel service is part of Base Operating System (BOS) Runtime.
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.