lkml.org 
[lkml]   [2019]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RESEND 1/2] uapi/asm-generic: Allow defining a custom __SIGINFO struct
Date
Allow defining a custom __SIGINFO struct. This allows architectures to
apply their own padding and allignment requirements to the struct. This
is similar to the __ARCH_SI_ATTRIBUTES #define that already exists, but
applies to the __SIGINFO struct instead of the siginfo_t struct.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
include/uapi/asm-generic/siginfo.h | 32 ++++++++++++++++--------------
1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/include/uapi/asm-generic/siginfo.h b/include/uapi/asm-generic/siginfo.h
index cb3d6c267181..09b0a1abac14 100644
--- a/include/uapi/asm-generic/siginfo.h
+++ b/include/uapi/asm-generic/siginfo.h
@@ -108,23 +108,25 @@ union __sifields {
} _sigsys;
};

-#ifndef __ARCH_HAS_SWAPPED_SIGINFO
-#define __SIGINFO \
-struct { \
- int si_signo; \
- int si_errno; \
- int si_code; \
- union __sifields _sifields; \
+#ifndef __SIGINFO
+# ifndef __ARCH_HAS_SWAPPED_SIGINFO
+# define __SIGINFO \
+struct { \
+ int si_signo; \
+ int si_errno; \
+ int si_code; \
+ union __sifields _sifields __ARCH_SI_ATTRIBUTES; \
}
-#else
-#define __SIGINFO \
-struct { \
- int si_signo; \
- int si_code; \
- int si_errno; \
- union __sifields _sifields; \
+# else
+# define __SIGINFO \
+struct { \
+ int si_signo; \
+ int si_code; \
+ int si_errno; \
+ union __sifields _sifields __ARCH_SI_ATTRIBUTES; \
}
-#endif /* __ARCH_HAS_SWAPPED_SIGINFO */
+# endif /* __ARCH_HAS_SWAPPED_SIGINFO */
+#endif /* __SIGINFO */

typedef struct siginfo {
union {
--
2.22.0
\
 
 \ /
  Last update: 2019-07-03 02:55    [W:1.591 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site