git: 20c301a76133 - stable/13 - atomic: Style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Oct 2022 14:03:26 UTC
The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=20c301a761330c96d95ce46fd365d2ae7973b00e commit 20c301a761330c96d95ce46fd365d2ae7973b00e Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2022-10-11 14:54:36 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2022-10-18 13:51:29 +0000 atomic: Style Fixes: 30253da1a982 ("atomic: Add some type checking to plain atomic_load/store helpers") (cherry picked from commit 301a27dc65463fc9a909835863ff5566623f6ef2) --- sys/sys/atomic_common.h | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/sys/atomic_common.h b/sys/sys/atomic_common.h index 04281ae8f2ed..a7b0b50512dc 100644 --- a/sys/sys/atomic_common.h +++ b/sys/sys/atomic_common.h @@ -81,15 +81,21 @@ #define __atomic_load_generic(p, t, ut, n) \ _Generic(*(p), \ - t: __atomic_load_ ## n ## _relaxed(p), ut: __atomic_load_ ## n ## _relaxed(p)) + t: __atomic_load_ ## n ## _relaxed(p), \ + ut: __atomic_load_ ## n ## _relaxed(p)) #define __atomic_store_generic(p, v, t, ut, n) \ _Generic(*(p), \ - t: __atomic_store_ ## n ## _relaxed(p, v), ut: __atomic_store_ ## n ## _relaxed(p, v)) + t: __atomic_store_ ## n ## _relaxed(p, v), \ + ut: __atomic_store_ ## n ## _relaxed(p, v)) #else -#define atomic_load_bool(p) __atomic_load_bool_relaxed(p) -#define atomic_store_bool(p, v) __atomic_store_bool_relaxed(p, v) -#define __atomic_load_generic(p, t, ut, n) __atomic_load_ ## n ## _relaxed(p) -#define __atomic_store_generic(p, v, t, ut, n) __atomic_store_ ## n ## _relaxed(p, v) +#define atomic_load_bool(p) \ + __atomic_load_bool_relaxed(p) +#define atomic_store_bool(p, v) \ + __atomic_store_bool_relaxed(p, v) +#define __atomic_load_generic(p, t, ut, n) \ + __atomic_load_ ## n ## _relaxed(p) +#define __atomic_store_generic(p, v, t, ut, n) \ + __atomic_store_ ## n ## _relaxed(p, v) #endif #define atomic_load_char(p) __atomic_load_generic(p, char, u_char, char) @@ -134,4 +140,4 @@ #define atomic_interrupt_fence() __compiler_membar() -#endif +#endif /* !_SYS_ATOMIC_COMMON_H_ */