cdev_output_empty()

Check if a character device's output buffer is empty

Synopsis:

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

Arguments:

cds
A pointer to a structure with the character device state (see cdev_state).

Description:

Calling this function makes sense only if you are using the internal buffers (i.e., you specified a non-zero buffer size when calling cdev_setup()).

Returns:

If the buffer is not empty, 0 (zero); if it is empty, meaning there are no characters to output, 1 (one); otherwise, a negative errno value.