Back to index

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

Go to the source code of this file.

Classes

struct  signalfd_siginfo

Defines

#define __need_sigset_t
#define SFD_CLOEXEC   SFD_CLOEXEC
#define SFD_NONBLOCK   SFD_NONBLOCK

Enumerations

enum  { SFD_CLOEXEC = 02000000, SFD_CLOEXEC = 02000000, SFD_NONBLOCK }

Functions

__BEGIN_DECLS int signalfd (int __fd, const sigset_t *__mask, int __flags) __THROW __nonnull((2))

Class Documentation

struct signalfd_siginfo

Definition at line 27 of file signalfd.h.

Class Members
uint8_t __pad
uint64_t ssi_addr
uint32_t ssi_band
int32_t ssi_code
int32_t ssi_errno
int32_t ssi_fd
int32_t ssi_int
uint32_t ssi_overrun
uint32_t ssi_pid
uint64_t ssi_ptr
uint32_t ssi_signo
int32_t ssi_status
uint64_t ssi_stime
uint32_t ssi_tid
uint32_t ssi_trapno
uint32_t ssi_uid
uint64_t ssi_utime

Define Documentation

#define __need_sigset_t

Definition at line 22 of file signalfd.h.

#define SFD_CLOEXEC   SFD_CLOEXEC

Definition at line 52 of file signalfd.h.

#define SFD_NONBLOCK   SFD_NONBLOCK

Enumeration Type Documentation

anonymous enum
Enumerator:
SFD_CLOEXEC 
SFD_CLOEXEC 
SFD_NONBLOCK 

Definition at line 49 of file signalfd.h.

  {
    SFD_CLOEXEC = 02000000,
#define SFD_CLOEXEC SFD_CLOEXEC
    SFD_NONBLOCK = 04000
#define SFD_NONBLOCK SFD_NONBLOCK
  };

Function Documentation

__BEGIN_DECLS int signalfd ( int  __fd,
const sigset_t __mask,
int  __flags 
)

Definition at line 26 of file signalfd.c.

{
#ifdef __NR_signalfd4
  return INLINE_SYSCALL (signalfd4, 4, fd, mask, _NSIG / 8, 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_signalfd
  return INLINE_SYSCALL (signalfd, 3, fd, mask, _NSIG / 8);
# else
  __set_errno (ENOSYS);
  return -1;
# endif
#endif
}

Here is the call graph for this function: