cdev_output_num_pending()

Check how many characters are in the output buffer

Synopsis:

#include <qvm/cdev.h>
static unsigned cdev_output_num_pending(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 in the output buffer; otherwise, a negative errno value.