diff options
| author | Ingo Molnar <mingo@kernel.org> | 2021-06-03 19:00:49 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2021-06-03 19:00:49 +0200 |
| commit | a9e906b71f963f19aabf7af59f73f37c929a5221 (patch) | |
| tree | 0228f82f4719160cfa4635c0c042c9c73fc2d2a5 /tools/include/linux/const.h | |
| parent | 475ea6c60279e9f2ddf7e4cf2648cd8ae0608361 (diff) | |
| parent | fcf6631f3736985ec89bdd76392d3c7bfb60119f (diff) | |
Merge branch 'sched/urgent' into sched/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/include/linux/const.h')
| -rw-r--r-- | tools/include/linux/const.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/include/linux/const.h b/tools/include/linux/const.h index 81b8aae5a855..435ddd72d2c4 100644 --- a/tools/include/linux/const.h +++ b/tools/include/linux/const.h @@ -3,4 +3,12 @@ #include <vdso/const.h> +/* + * This returns a constant expression while determining if an argument is + * a constant expression, most importantly without evaluating the argument. + * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de> + */ +#define __is_constexpr(x) \ + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8))) + #endif /* _LINUX_CONST_H */ |
