Module Name: src Committed By: andvar Date: Fri Mar 15 20:09:31 UTC 2024
Modified Files: src/sys/uvm: uvm_swap.h Log Message: Rewrite !VMSWAP uvm_swap_stats() macro as a static function. NFCI. >From riastradh To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/uvm/uvm_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_swap.h diff -u src/sys/uvm/uvm_swap.h:1.27 src/sys/uvm/uvm_swap.h:1.28 --- src/sys/uvm/uvm_swap.h:1.27 Fri Mar 15 07:09:37 2024 +++ src/sys/uvm/uvm_swap.h Fri Mar 15 20:09:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.h,v 1.27 2024/03/15 07:09:37 andvar Exp $ */ +/* $NetBSD: uvm_swap.h,v 1.28 2024/03/15 20:09:31 andvar Exp $ */ /* * Copyright (c) 1997 Matthew R. Green @@ -39,10 +39,10 @@ #endif struct lwp; +struct swapent; #if defined(VMSWAP) -struct swapent; struct vm_page; int uvm_swap_get(struct vm_page *, int, int); @@ -57,8 +57,18 @@ int uvm_swap_stats(char *, int, void (*)(void *, const struct swapent *), size_t, register_t *); #else /* defined(VMSWAP) */ + #define uvm_swapisfull() true -#define uvm_swap_stats(c, l, f, count, retval) (void)(f), (*retval = 0, ENOSYS) + +static inline int +uvm_swap_stats(char *c, int l, void (*f)(void *, const struct swapent *), + size_t count, register_t *retval) +{ + + retval = 0; + return ENOSYS; +} + #endif /* defined(VMSWAP) */ void uvm_swap_shutdown(struct lwp *);