Retrieves a character from a character list.
#include <sys/types.h> #include <sys/errno.h> #include <cblock.h>
int getc (header) struct clist *header;
header | Specifies the address of the clist structure that describes the character list. |
Attention: The caller of the getc service must ensure that the character list is pinned. This includes the clist header and all the cblock character buffers. Otherwise, the system may crash.
The getc kernel service returns the character at the front of the character list. After returning the last character in the buffer, the getc service frees that buffer.
The getc kernel service can be called from either the process or interrupt environment.
-1 | Indicates that the character list is empty. |
The getc kernel service is part of Base Operating System (BOS) Runtime.
I/O Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.