Places a character on a character list.
#include <sys/types.h> #include <sys/errno.h> #include <sys/cblock.h>
int putcx (c, header) char c; struct clist *header;
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. |
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.
The putcx 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 putcx 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.