Updated: October 28, 2024 |
Check how much space is available in a character device's input buffer
#include <qvm/cdev.h>
static unsigned cdev_input_num_available(const struct cdev_state *const cds)
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()).
If successful, the number of characters that may still be placed in the character device's input buffer; otherwise, a negative errno value.