Removes the first buffer from a character list and returns the address of the removed buffer.
#include <sys/types.h>
#include <sys/errno.h>
#include <cblock.h>
struct cblock *getcb
( header)
struct clist *header;
Item | Description |
---|---|
header | Specifies the address of the clist structure that describes the character list. |
Attention: The caller of the getcb service must ensure that the character list is pinned. This includes the clist header and all the cblock character buffers. Character buffers acquired from the getcf service are pinned. Otherwise, the system may crash.
The getcb kernel service returns the address of the character buffer at the start of the character list and removes that buffer from the character list. The user must free the buffer with the putcf service when finished with it.
The getcb kernel service can be called from either the process or interrupt environment.
A null address indicates the character list is empty.
The getcb service returns the address of the character buffer at the start of the character list when the character list is not empty.