Places a character buffer at the end of a character list.
#include <sys/types.h> #include <sys/errno.h> #include <cblock.h>
void putcb (p, header) struct cblock *p; struct clist *header;
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. |
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.
The putcb 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 putcb 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.