Commit 51e6ac1f authored by Mark Brown's avatar Mark Brown Committed by Will Deacon
Browse files

tools include: Add some common function attributes



We don't have definitions of __always_unused or __noreturn in the tools
version of compiler.h, add them so we can use them in kselftests.

Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230728-arm64-signal-memcpy-fix-v4-3-0c1290db5d46@kernel.org


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent e5d51a66
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -42,6 +42,18 @@
# define __always_inline	inline __attribute__((always_inline))
#endif

#ifndef __always_unused
#define __always_unused __attribute__((__unused__))
#endif

#ifndef __noreturn
#define __noreturn __attribute__((__noreturn__))
#endif

#ifndef unreachable
#define unreachable() __builtin_unreachable()
#endif

#ifndef noinline
#define noinline
#endif