Back to index

glibc  2.9
Defines | Typedefs | Enumerations | Functions
eventfd.h File Reference
#include <stdint.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EFD_CLOEXEC   EFD_CLOEXEC
#define EFD_NONBLOCK   EFD_NONBLOCK

Typedefs

typedef uint64_t eventfd_t

Enumerations

enum  { EFD_CLOEXEC = 02000000, EFD_CLOEXEC = 02000000, EFD_NONBLOCK }

Functions

__BEGIN_DECLS int eventfd (int __count, int __flags) __THROW
int eventfd_read (int __fd, eventfd_t *__value)
int eventfd_write (int __fd, eventfd_t value)

Define Documentation

#define EFD_CLOEXEC   EFD_CLOEXEC

Definition at line 32 of file eventfd.h.

#define EFD_NONBLOCK   EFD_NONBLOCK

Typedef Documentation

Definition at line 26 of file eventfd.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
EFD_CLOEXEC 
EFD_CLOEXEC 
EFD_NONBLOCK 

Definition at line 29 of file eventfd.h.

  {
    EFD_CLOEXEC = 02000000,
#define EFD_CLOEXEC EFD_CLOEXEC
    EFD_NONBLOCK = 04000
#define EFD_NONBLOCK EFD_NONBLOCK
  };

Function Documentation

__BEGIN_DECLS int eventfd ( int  __count,
int  __flags 
)

Definition at line 25 of file eventfd.c.

{
#ifdef __NR_eventfd2
  return INLINE_SYSCALL (eventfd2, 2, count, flags);
#else
  /* The old system call has no flag parameter which is bad.  So we have
     to wait until we have to support to pass additional values to the
     kernel (sys_indirect) before implementing setting flags like
     O_NONBLOCK etc.  */
  if (flags != 0)
    {
      __set_errno (EINVAL);
      return -1;
    }

# ifdef __NR_eventfd
  return INLINE_SYSCALL (eventfd, 1, count);
# else
  __set_errno (ENOSYS);
  return -1;
# endif
#endif
}

Here is the call graph for this function:

int eventfd_read ( int  __fd,
eventfd_t __value 
)

Definition at line 25 of file eventfd_read.c.

{
  return __read (fd, value, sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0;
}

Here is the call graph for this function:

int eventfd_write ( int  __fd,
eventfd_t  value 
)

Definition at line 25 of file eventfd_write.c.

{
  return __write (fd, &value,
                sizeof (eventfd_t)) != sizeof (eventfd_t) ? -1 : 0;
}

Here is the call graph for this function: