git: da717031c9fd - main - LinuxKPI: compiler.h add three more defines
Bjoern A. Zeeb
bz at FreeBSD.org
Tue May 25 18:15:15 UTC 2021
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=da717031c9fd914343e19ba87f19c7a9a7006721
commit da717031c9fd914343e19ba87f19c7a9a7006721
Author: Bjoern A. Zeeb <bz at FreeBSD.org>
AuthorDate: 2021-05-24 17:59:13 +0000
Commit: Bjoern A. Zeeb <bz at FreeBSD.org>
CommitDate: 2021-05-25 18:01:48 +0000
LinuxKPI: compiler.h add three more defines
Add fallthrough, ____cacheline_aligned_in_smp, and smp_mb() to
linux/compiler.h.
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30420
---
sys/compat/linuxkpi/common/include/linux/compiler.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h
index 470e1f151413..e641b1b096c3 100644
--- a/sys/compat/linuxkpi/common/include/linux/compiler.h
+++ b/sys/compat/linuxkpi/common/include/linux/compiler.h
@@ -65,6 +65,8 @@
#define __always_inline inline
#define noinline __noinline
#define ____cacheline_aligned __aligned(CACHE_LINE_SIZE)
+#define ____cacheline_aligned_in_smp __aligned(CACHE_LINE_SIZE)
+#define fallthrough /* FALLTHROUGH */ do { } while(0)
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
@@ -78,6 +80,7 @@
#define __printf(a,b) __printflike(a,b)
#define barrier() __asm__ __volatile__("": : :"memory")
+#define smp_mb() mb()
#define lower_32_bits(n) ((u32)(n))
#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
More information about the dev-commits-src-main
mailing list