[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190703005202.7578-2-alistair.francis@wdc.com>
Date: Tue, 2 Jul 2019 17:52:01 -0700
From: Alistair Francis <alistair.francis@....com>
To: linux-riscv@...ts.infradead.org, arnd@...db.de
Cc: linux-kernel@...r.kernel.org, alistair23@...il.com,
Alistair Francis <alistair.francis@....com>
Subject: [PATCH RESEND 1/2] uapi/asm-generic: Allow defining a custom __SIGINFO struct
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@....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
Powered by blists - more mailing lists