mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
teach SYSCALL_DEFINE/COMPAT_SYSCALL_DEFINE to handle __bitwise arguments
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -100,11 +100,12 @@ union bpf_attr;
|
||||
#define __MAP(n,...) __MAP##n(__VA_ARGS__)
|
||||
|
||||
#define __SC_DECL(t, a) t a
|
||||
#define __TYPE_IS_L(t) (__same_type((t)0, 0L))
|
||||
#define __TYPE_IS_UL(t) (__same_type((t)0, 0UL))
|
||||
#define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL))
|
||||
#define __TYPE_AS(t, v) __same_type((__force t)0, v)
|
||||
#define __TYPE_IS_L(t) (__TYPE_AS(t, 0L))
|
||||
#define __TYPE_IS_UL(t) (__TYPE_AS(t, 0UL))
|
||||
#define __TYPE_IS_LL(t) (__TYPE_AS(t, 0LL) || __TYPE_AS(t, 0ULL))
|
||||
#define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a
|
||||
#define __SC_CAST(t, a) (t) a
|
||||
#define __SC_CAST(t, a) (__force t) a
|
||||
#define __SC_ARGS(t, a) a
|
||||
#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user