cdev_input_num_available()

Check how much space is available in the character device's input buffer

Synopsis:

#include <qvm/cdev.h>
static unsigned cdev_input_num_available(const struct cdev_state *const cds)

Arguments:

cds
A pointer to a structure with the state of the character device.

Library:

Provided by qvm; no external library is required.

Description:

Calling this static inline function makes sense only if you are using the internal buffers (non-zero buffer size when calling cdev_setup()).

Returns:

If successful, the number of characters that may still be placed in the character device's input buffer; otherwise, a negative errno value.