drain_check()

Check if a device has been drained

Synopsis:

#include <sys/io-char.h>

int drain_check( TTYDEV *dev,
                 uintptr_t *count );

Arguments:

dev
The device to be checked.
count
A pointer to an unsigned integer that is set to 1 if the device's output buffer count is not 0. This value can be NULL.

Description:

The drain_check() function checks if the output buffer of a terminal device has been fully drained (emptied). In other words, the function determines if all data has been transmitted from the device's output buffer.

Returns:

0
The device's output buffer count isn't 0.
1
The device's output buffer count is 0.
Page updated: