Home | History | Annotate | Download | only in include
      1 /*
      2  *  Derived from Goldfish include/linux/signalfd.h
      3  *
      4  *  Copyright (C) 2007  Davide Libenzi <davidel (at) xmailserver.org>
      5  *
      6  */
      7 
      8 #ifndef _LINUX_SIGNALFD_PORTABLE_H
      9 #define _LINUX_SIGNALFD_PORTABLE_H
     10 
     11 #include <linux/types.h>
     12 #include <fcntl.h>
     13 
     14 /* Flags for signalfd4.  */
     15 #define SFD_CLOEXEC             O_CLOEXEC
     16 #define SFD_NONBLOCK            O_NONBLOCK
     17 
     18 /* For O_CLOEXEC_PORTABLE and O_NONBLOCK_PORTABLE */
     19 #include "fcntl_portable.h"
     20 
     21 #define SFD_CLOEXEC_PORTABLE    O_CLOEXEC_PORTABLE
     22 #define SFD_NONBLOCK_PORTABLE   O_NONBLOCK_PORTABLE
     23 
     24 /*
     25  * This structure is the same for Native and Portable.
     26  * However for MIPS ssi_signo and ssi_errno differ in their
     27  * values and need to be mapped.
     28  */
     29 struct signalfd_siginfo {
     30         __u32 ssi_signo;
     31         __s32 ssi_errno;
     32         __s32 ssi_code;
     33         __u32 ssi_pid;
     34         __u32 ssi_uid;
     35         __s32 ssi_fd;
     36         __u32 ssi_tid;
     37         __u32 ssi_band;
     38         __u32 ssi_overrun;
     39         __u32 ssi_trapno;
     40         __s32 ssi_status;
     41         __s32 ssi_int;
     42         __u64 ssi_ptr;
     43         __u64 ssi_utime;
     44         __u64 ssi_stime;
     45         __u64 ssi_addr;
     46 
     47         /*
     48          * Pad structure to 128 bytes. Remember to update the
     49          * pad size when you add new members. We use a fixed
     50          * size structure to avoid compatibility problems with
     51          * future versions, and we leave extra space for additional
     52          * members. We use fixed size members because this structure
     53          * comes out of a read(2) and we really don't want to have
     54          * a compat (sp?) on read(2).
     55          */
     56         __u8 __pad[48];
     57 };
     58 
     59 #endif /* _LINUX_SIGNALFD_PORTABLE_H */
     60 
     61