Back to index

glibc  2.9
Functions
fcntl.c File Reference
#include <assert.h>
#include <errno.h>
#include <sysdep-cancel.h>
#include <fcntl.h>
#include <stdarg.h>
#include <sys/syscall.h>

Go to the source code of this file.

Functions

int __fcntl_nocancel (int fd, int cmd,...)
int __libc_fcntl (int fd, int cmd,...)

Function Documentation

int __fcntl_nocancel ( int  fd,
int  cmd,
  ... 
)

Definition at line 30 of file fcntl.c.

{
  va_list ap;
  void *arg;

  va_start (ap, cmd);
  arg = va_arg (ap, void *);
  va_end (ap);

  return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int __libc_fcntl ( int  fd,
int  cmd,
  ... 
)

Definition at line 45 of file fcntl.c.

{
  va_list ap;
  void *arg;

  va_start (ap, cmd);
  arg = va_arg (ap, void *);
  va_end (ap);

  if (cmd >= F_GETLK64 && cmd <= F_SETLKW64)
    cmd -= F_GETLK64 - F_GETLK;

  if (SINGLE_THREAD_P || cmd != F_SETLKW)
    return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);

  int oldtype = LIBC_CANCEL_ASYNC ();

  int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);

  LIBC_CANCEL_RESET (oldtype);

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function: