Back to index

glibc  2.9
signalfd.h
Go to the documentation of this file.
00001 /* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef       _SYS_SIGNALFD_H
00020 #define       _SYS_SIGNALFD_H      1
00021 
00022 #define __need_sigset_t
00023 #include <signal.h>
00024 #include <stdint.h>
00025 
00026 
00027 struct signalfd_siginfo
00028 {
00029   uint32_t ssi_signo;
00030   int32_t ssi_errno;
00031   int32_t ssi_code;
00032   uint32_t ssi_pid;
00033   uint32_t ssi_uid;
00034   int32_t ssi_fd;
00035   uint32_t ssi_tid;
00036   uint32_t ssi_band;
00037   uint32_t ssi_overrun;
00038   uint32_t ssi_trapno;
00039   int32_t ssi_status;
00040   int32_t ssi_int;
00041   uint64_t ssi_ptr;
00042   uint64_t ssi_utime;
00043   uint64_t ssi_stime;
00044   uint64_t ssi_addr;
00045   uint8_t __pad[48];
00046 };
00047 
00048 /* Flags for signalfd.  */
00049 enum
00050   {
00051     SFD_CLOEXEC = 02000000,
00052 #define SFD_CLOEXEC SFD_CLOEXEC
00053     SFD_NONBLOCK = 0200
00054 #define SFD_NONBLOCK SFD_NONBLOCK
00055   };
00056 
00057 __BEGIN_DECLS
00058 
00059 /* Request notification for delivery of signals in MASK to be
00060    performed using descriptor FD.*/
00061 extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
00062   __nonnull ((2)) __THROW;
00063 
00064 __END_DECLS
00065 
00066 #endif /* sys/signalfd.h */