buff_create()

Create a circular buffer

Synopsis:

struct buffer *buff_create( unsigned size, 
                            unsigned rsize );

Description:

This function creates a circular buffer made up of size number of rsize records.

Returns:

A pointer to an initialized buffer handle, or NULL if memory for the buffer data couldn't be allocated.


Note: All the other buff_*() functions take as their first argument the handle returned by the successful execution of buff_create().

Classification:

QNX

Safety:
Interrupt handler Not applicable
Signal handler Not applicable
Thread Not applicable

See also:

buff_append(), buff_delete(), buff_flush(), buff_getc(), buff_putc(), buff_waiting()