getc, getcb, getcbp, getcf --
read clist buffers
int getc(struct clist cp);
struct cblock getcb(struct clist cp);
int getcbp(struct clist cp, char buf, int n);
struct cblock getcf(void);
function removes and returns one character from
a clist buffer.
function removes and returns one cblock
from the clist buffer.
function removes the specified number of characters
from a clist and transfers them to
a character buffer.
function takes a cblock from the
freelist and returns a pointer to it.
Pointer to a clist buffer.
Character buffer to which to transfer the characters.
Number of characters to transfer.
getc returns the next character in the buffer or -1 if
the buffer is empty.
getcb returns a pointer to the first cblock of
the clist or NULL if the clist is
getcbp returns the number of characters actually moved
(which is less than or equal to n).
a pointer to a cblock if available.
Otherwise, it returns NULL.
These routines can be used only within character device drivers.
These routines protect their internal critical sections of code
Context and synchronization
Non-blockable, interrupt, user, or blockable
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
SVR5 DDI compatibility
DDI drivers are implemented as STREAMS devices
and do not use clists
so there is no comparable function for DDI drivers.
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005