aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-05-10 13:55:09 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-05-10 13:55:09 +0300
commit4e3d119ed840b547cf76354e90f292c44c9fe162 (patch)
treeb0004397d69859d0cd3bb149f33a01222c14bf37 /include
parent58fdcec91d1cdd0e39d723884e0fef1f33d1efc5 (diff)
downloadkmi-4e3d119ed840b547cf76354e90f292c44c9fe162.tar.gz
kmi-4e3d119ed840b547cf76354e90f292c44c9fe162.zip
update formatting config
Diffstat (limited to 'include')
-rw-r--r--include/kmi/atomic.h2
-rw-r--r--include/kmi/uapi.h68
-rw-r--r--include/kmi/unaligned.h32
-rw-r--r--include/kmi/utils.h66
4 files changed, 84 insertions, 84 deletions
diff --git a/include/kmi/atomic.h b/include/kmi/atomic.h
index 76d50e4..88ffdfa 100644
--- a/include/kmi/atomic.h
+++ b/include/kmi/atomic.h
@@ -404,7 +404,7 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t;
*/
#define atomic_compare_exchange_weak(obj, val, des) \
atomic_compare_exchange_weak_explicit(obj, val, des, __ATOMIC_SEQ_CST, \
- __ATOMIC_SEQ_CST)
+ __ATOMIC_SEQ_CST)
/**
* Explicit atomic in-place addition.
diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h
index 39ba79f..40cfae4 100644
--- a/include/kmi/uapi.h
+++ b/include/kmi/uapi.h
@@ -50,11 +50,11 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE0(name) \
void sys_##name(struct tcb *t, \
- sys_arg_t a, \
- sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, \
- sys_arg_t e);
+ sys_arg_t a, \
+ sys_arg_t b, \
+ sys_arg_t c, \
+ sys_arg_t d, \
+ sys_arg_t e);
/**
* Helper macro for declaring syscalls with one argument.
@@ -64,8 +64,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE1(name, a) \
void sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e);
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e);
/**
* Helper macro for declaring syscalls with two arguments.
@@ -76,8 +76,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE2(name, a, b) \
void sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e);
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e);
/**
* Helper macro for declaring syscalls with three arguments.
@@ -89,8 +89,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE3(name, a, b, c) \
void sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e);
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e);
/**
* Helper macro for declaring syscalls with four arguments.
@@ -103,8 +103,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE4(name, a, b, c, d) \
void sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e);
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e);
/**
* Helper macro for declaring syscalls with five arguments.
@@ -118,8 +118,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DECLARE5(name, a, b, c, d, e) \
void sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e);
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e);
/**
* Helper macro for defining syscall with zero arguments.
@@ -135,8 +135,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
#define SYSCALL_DEFINE0(name) \
static inline void __##name(struct tcb *t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
UNUSED(a); \
UNUSED(b); \
@@ -155,8 +155,8 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
#define SYSCALL_DEFINE1(name) \
static inline void __##name(struct tcb *, sys_arg_t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
UNUSED(b); \
UNUSED(c); \
@@ -173,10 +173,10 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DEFINE2(name) \
static inline void __##name(struct tcb *, sys_arg_t, \
- sys_arg_t); \
+ sys_arg_t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
UNUSED(c); \
UNUSED(d); \
@@ -192,11 +192,11 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DEFINE3(name) \
static inline void __##name(struct tcb *, sys_arg_t, \
- sys_arg_t, \
- sys_arg_t); \
+ sys_arg_t, \
+ sys_arg_t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
UNUSED(d); \
UNUSED(e); \
@@ -211,11 +211,11 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DEFINE4(name) \
static inline void __##name(struct tcb *, sys_arg_t, \
- sys_arg_t, sys_arg_t, \
- sys_arg_t); \
+ sys_arg_t, sys_arg_t, \
+ sys_arg_t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
UNUSED(e); \
__##name(t, a, b, c, d); \
@@ -229,11 +229,11 @@ typedef void (*sys_t)(struct tcb *t, long, long, long, long, long);
*/
#define SYSCALL_DEFINE5(name) \
static inline void __##name(struct tcb *, sys_arg_t, \
- sys_arg_t, sys_arg_t, \
- sys_arg_t, sys_arg_t); \
+ sys_arg_t, sys_arg_t, \
+ sys_arg_t, sys_arg_t); \
void __noinline sys_##name(struct tcb *t, sys_arg_t a, sys_arg_t b, \
- sys_arg_t c, \
- sys_arg_t d, sys_arg_t e) \
+ sys_arg_t c, \
+ sys_arg_t d, sys_arg_t e) \
{ \
__##name(t, a, b, c, d, e); \
} \
diff --git a/include/kmi/unaligned.h b/include/kmi/unaligned.h
index fac5146..89f5894 100644
--- a/include/kmi/unaligned.h
+++ b/include/kmi/unaligned.h
@@ -20,15 +20,15 @@
*/
#define get_unaligned(ptr) \
_Generic(*(ptr), \
- uint8_t: get_unaligned_uint8_t, \
- uint16_t: get_unaligned_uint16_t, \
- uint32_t: get_unaligned_uint32_t, \
- uint64_t: get_unaligned_uint64_t, \
+ uint8_t: get_unaligned_uint8_t, \
+ uint16_t: get_unaligned_uint16_t, \
+ uint32_t: get_unaligned_uint32_t, \
+ uint64_t: get_unaligned_uint64_t, \
\
- int8_t: get_unaligned_int8_t, \
- int16_t: get_unaligned_int16_t, \
- int32_t: get_unaligned_int32_t, \
- int64_t: get_unaligned_int64_t)((void *)ptr)
+ int8_t: get_unaligned_int8_t, \
+ int16_t: get_unaligned_int16_t, \
+ int32_t: get_unaligned_int32_t, \
+ int64_t: get_unaligned_int64_t)((void *)ptr)
/**
* Put unaligned value. Type of value is deduced from pointer type.
@@ -38,15 +38,15 @@
*/
#define put_unaligned(val, ptr) \
_Generic(*(ptr), \
- uint8_t: put_unaligned_uint8_t, \
- uint16_t: put_unaligned_uint16_t, \
- uint32_t: put_unaligned_uint32_t, \
- uint64_t: put_unaligned_uint64_t, \
+ uint8_t: put_unaligned_uint8_t, \
+ uint16_t: put_unaligned_uint16_t, \
+ uint32_t: put_unaligned_uint32_t, \
+ uint64_t: put_unaligned_uint64_t, \
\
- int8_t: put_unaligned_int8_t, \
- int16_t: put_unaligned_int16_t, \
- int32_t: put_unaligned_int32_t, \
- int64_t: put_unaligned_int64_t)(val, (void *)ptr)
+ int8_t: put_unaligned_int8_t, \
+ int16_t: put_unaligned_int16_t, \
+ int32_t: put_unaligned_int32_t, \
+ int64_t: put_unaligned_int64_t)(val, (void *)ptr)
/**
* Helper macro for defining an unaligned value reader.
diff --git a/include/kmi/utils.h b/include/kmi/utils.h
index 10f99d3..914d456 100644
--- a/include/kmi/utils.h
+++ b/include/kmi/utils.h
@@ -248,18 +248,18 @@
*/
#define align_up(x, y) \
_Generic((x), signed char \
- : align_up_c, signed short \
- : align_up_s, signed int \
- : align_up_i, signed long \
- : align_up_l, signed long long \
- : align_up_ll, \
+ : align_up_c, signed short \
+ : align_up_s, signed int \
+ : align_up_i, signed long \
+ : align_up_l, signed long long \
+ : align_up_ll, \
\
- unsigned char \
- : align_up_uc, unsigned short \
- : align_up_us, unsigned int \
- : align_up_ui, unsigned long \
- : align_up_ul, unsigned long long \
- : align_up_ull)((x), (y))
+ unsigned char \
+ : align_up_uc, unsigned short \
+ : align_up_us, unsigned int \
+ : align_up_ui, unsigned long \
+ : align_up_ul, unsigned long long \
+ : align_up_ull)((x), (y))
/**
* Helper macro for defining type specific aligning.
@@ -383,18 +383,18 @@ DEFINE_ALIGN_UP(ull, unsigned long long);
*/
#define align_down(x, y) \
_Generic((x), signed char \
- : align_down_c, signed short \
- : align_down_s, signed int \
- : align_down_i, signed long \
- : align_down_l, signed long long \
- : align_down_ll, \
+ : align_down_c, signed short \
+ : align_down_s, signed int \
+ : align_down_i, signed long \
+ : align_down_l, signed long long \
+ : align_down_ll, \
\
- unsigned char \
- : align_down_uc, unsigned short \
- : align_down_us, unsigned int \
- : align_down_ui, unsigned long \
- : align_down_ul, unsigned long long \
- : align_down_ull)((x), (y))
+ unsigned char \
+ : align_down_uc, unsigned short \
+ : align_down_us, unsigned int \
+ : align_down_ui, unsigned long \
+ : align_down_ul, unsigned long long \
+ : align_down_ull)((x), (y))
/**
* Helper macro for defining type specific aligning.
@@ -511,18 +511,18 @@ DEFINE_ALIGN_DOWN(ull, unsigned long long);
*/
#define is_aligned(x, y) \
_Generic((x), signed char \
- : is_aligned_c, signed short \
- : is_aligned_s, signed int \
- : is_aligned_i, signed long \
- : is_aligned_l, signed long long \
- : is_aligned_ll, \
+ : is_aligned_c, signed short \
+ : is_aligned_s, signed int \
+ : is_aligned_i, signed long \
+ : is_aligned_l, signed long long \
+ : is_aligned_ll, \
\
- unsigned char \
- : is_aligned_uc, unsigned short \
- : is_aligned_us, unsigned int \
- : is_aligned_ui, unsigned long \
- : is_aligned_ul, unsigned long long \
- : is_aligned_ll)((x), (y))
+ unsigned char \
+ : is_aligned_uc, unsigned short \
+ : is_aligned_us, unsigned int \
+ : is_aligned_ui, unsigned long \
+ : is_aligned_ul, unsigned long long \
+ : is_aligned_ll)((x), (y))
/**
* Helper macro for defining type specific alignment checks.