16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * include/linux/signalfd.h 4607ca46eSDavid Howells * 5607ca46eSDavid Howells * Copyright (C) 2007 Davide Libenzi <davidel@xmailserver.org> 6607ca46eSDavid Howells * 7607ca46eSDavid Howells */ 8607ca46eSDavid Howells 9607ca46eSDavid Howells #ifndef _UAPI_LINUX_SIGNALFD_H 10607ca46eSDavid Howells #define _UAPI_LINUX_SIGNALFD_H 11607ca46eSDavid Howells 12607ca46eSDavid Howells #include <linux/types.h> 13607ca46eSDavid Howells /* For O_CLOEXEC and O_NONBLOCK */ 14607ca46eSDavid Howells #include <linux/fcntl.h> 15607ca46eSDavid Howells 16607ca46eSDavid Howells /* Flags for signalfd4. */ 17607ca46eSDavid Howells #define SFD_CLOEXEC O_CLOEXEC 18607ca46eSDavid Howells #define SFD_NONBLOCK O_NONBLOCK 19607ca46eSDavid Howells 20607ca46eSDavid Howells struct signalfd_siginfo { 21607ca46eSDavid Howells __u32 ssi_signo; 22607ca46eSDavid Howells __s32 ssi_errno; 23607ca46eSDavid Howells __s32 ssi_code; 24607ca46eSDavid Howells __u32 ssi_pid; 25607ca46eSDavid Howells __u32 ssi_uid; 26607ca46eSDavid Howells __s32 ssi_fd; 27607ca46eSDavid Howells __u32 ssi_tid; 28607ca46eSDavid Howells __u32 ssi_band; 29607ca46eSDavid Howells __u32 ssi_overrun; 30607ca46eSDavid Howells __u32 ssi_trapno; 31607ca46eSDavid Howells __s32 ssi_status; 32607ca46eSDavid Howells __s32 ssi_int; 33607ca46eSDavid Howells __u64 ssi_ptr; 34607ca46eSDavid Howells __u64 ssi_utime; 35607ca46eSDavid Howells __u64 ssi_stime; 36607ca46eSDavid Howells __u64 ssi_addr; 37607ca46eSDavid Howells __u16 ssi_addr_lsb; 3876b7f670SEric W. Biederman __u16 __pad2; 3976b7f670SEric W. Biederman __s32 ssi_syscall; 4076b7f670SEric W. Biederman __u64 ssi_call_addr; 4176b7f670SEric W. Biederman __u32 ssi_arch; 42607ca46eSDavid Howells 43607ca46eSDavid Howells /* 44607ca46eSDavid Howells * Pad strcture to 128 bytes. Remember to update the 45607ca46eSDavid Howells * pad size when you add new members. We use a fixed 46607ca46eSDavid Howells * size structure to avoid compatibility problems with 47607ca46eSDavid Howells * future versions, and we leave extra space for additional 48607ca46eSDavid Howells * members. We use fixed size members because this strcture 49607ca46eSDavid Howells * comes out of a read(2) and we really don't want to have 50607ca46eSDavid Howells * a compat on read(2). 51607ca46eSDavid Howells */ 52*922e3013SEric W. Biederman __u8 __pad[28]; 53607ca46eSDavid Howells }; 54607ca46eSDavid Howells 55607ca46eSDavid Howells 56607ca46eSDavid Howells 57607ca46eSDavid Howells #endif /* _UAPI_LINUX_SIGNALFD_H */ 58