Back to index

glibc  2.9
Functions
tcdrain.c File Reference
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <sysdep-cancel.h>

Go to the source code of this file.

Functions

int __libc_tcdrain (int fd)

Function Documentation

Definition at line 26 of file tcdrain.c.

{
  if (SINGLE_THREAD_P)
    /* With an argument of 1, TCSBRK for output to be drain.  */
    return INLINE_SYSCALL (ioctl, 3, fd, TCSBRK, 1);

  int oldtype = LIBC_CANCEL_ASYNC ();

  /* With an argument of 1, TCSBRK for output to be drain.  */
  int result = INLINE_SYSCALL (ioctl, 3, fd, TCSBRK, 1);

  LIBC_CANCEL_RESET (oldtype);

  return result;
}

Here is the call graph for this function: