Back to index

glibc  2.9
Functions
tcflush.c File Reference
#include <errno.h>
#include <stddef.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sysv_termio.h>

Go to the source code of this file.

Functions

int tcflush (int fd, int queue_selector)

Function Documentation

int tcflush ( int  fd,
int  queue_selector 
)

Definition at line 29 of file tcflush.c.

{
  switch (queue_selector)
    {
    case TCIFLUSH:
      return __ioctl (fd, _TCFLSH, 0);
    case TCOFLUSH:
      return __ioctl (fd, _TCFLSH, 1);
    case TCIOFLUSH:
      return __ioctl (fd, _TCFLSH, 2);
    default:
      __set_errno (EINVAL);
      return -1;
    }
}