summaryrefslogtreecommitdiff
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-05 12:39:40 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-05 13:01:34 -0500
commit605e2311d9cfbc1acc7ba9181a05b8976d42ea46 (patch)
tree22135a6709fb9da10d98d20f4136c824cec9870c /include/linux/compiler.h
parent30c4b24b77b64b64179f74c1c615b9a36eaaa8bd (diff)
linux header updates
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 02fc3343..3ecc3dd1 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -182,4 +182,9 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
#define CONFIG_X86_64 y
#endif
+#define __is_constexpr(x) \
+ (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
+#define is_signed_type(type) (((type)(-1)) < (__force type)1)
+#define is_unsigned_type(type) (!is_signed_type(type))
+
#endif /* _TOOLS_LINUX_COMPILER_H */