git: d08cb45362e0 - main - iflib: Use empty inline functions for prefetch*() on non-x86.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 09 Apr 2022 00:28:07 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d08cb45362e0c00f29bf0a1f9c639f22042df34b commit d08cb45362e0c00f29bf0a1f9c639f22042df34b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-09 00:25:14 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-09 00:25:14 +0000 iflib: Use empty inline functions for prefetch*() on non-x86. This avoids warnings about unused variables in expressions passed to prefetch*(). --- sys/net/iflib.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 2971a22d799e..d088571b09c0 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1399,6 +1399,7 @@ prefetch(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); } + static __inline void prefetch2cachelines(void *x) { @@ -1408,8 +1409,15 @@ prefetch2cachelines(void *x) #endif } #else -#define prefetch(x) -#define prefetch2cachelines(x) +static __inline void +prefetch(void *x) +{ +} + +static __inline void +prefetch2cachelines(void *x) +{ +} #endif static void