cdev_output_num_pending()

Check how many characters are in a character device's 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 character device state (see cdev_state).

Description:

This function reports how many characters are presently in the output buffer for the specified device. 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 successful, the number of characters in the output buffer; otherwise, a negative errno value.

Page updated: