Date: Tue, 25 May 2021 18:15:14 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: da717031c9fd - main - LinuxKPI: compiler.h add three more defines Message-ID: <202105251815.14PIFELi044123@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=da717031c9fd914343e19ba87f19c7a9a7006721 commit da717031c9fd914343e19ba87f19c7a9a7006721 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2021-05-24 17:59:13 +0000 Commit: Bjoern A. Zeeb <bz@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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105251815.14PIFELi044123>