diff options
Diffstat (limited to 'freebsd/sys/kern/vfs_cache.c')
-rw-r--r-- | freebsd/sys/kern/vfs_cache.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/freebsd/sys/kern/vfs_cache.c b/freebsd/sys/kern/vfs_cache.c index 7c14b080..7ae1de1d 100644 --- a/freebsd/sys/kern/vfs_cache.c +++ b/freebsd/sys/kern/vfs_cache.c @@ -1,3 +1,5 @@ +#include <machine/rtems-bsd-kernel-space.h> + /*- * SPDX-License-Identifier: BSD-3-Clause * @@ -37,8 +39,8 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_ddb.h" -#include "opt_ktrace.h" +#include <rtems/bsd/local/opt_ddb.h> +#include <rtems/bsd/local/opt_ktrace.h> #include <sys/param.h> #include <sys/systm.h> @@ -339,12 +341,14 @@ cache_out_ts(struct namecache *ncp, struct timespec *tsp, int *ticksp) } static int __read_mostly doingcache = 1; /* 1 => enable the cache */ +#ifndef __rtems__ SYSCTL_INT(_debug, OID_AUTO, vfscache, CTLFLAG_RW, &doingcache, 0, "VFS namecache enabled"); /* Export size information to userland */ SYSCTL_INT(_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, sizeof(struct namecache), "sizeof(struct namecache)"); +#endif /* __rtems__ */ /* * The new name cache statistics @@ -397,10 +401,12 @@ static void cache_maybe_yield(void) { +#ifndef __rtems__ if (should_yield()) { cache_yield++; kern_yield(PRI_USER); } +#endif /* __rtems__ */ } static inline void @@ -1918,7 +1924,11 @@ nchinit(void *dummy __unused) numfullpathfail4 = counter_u64_alloc(M_WAITOK); numfullpathfound = counter_u64_alloc(M_WAITOK); } +#ifndef __rtems__ SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); +#else /* __rtems__ */ +SYSINIT(vfs_c, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL); +#endif /* __rtems__ */ void cache_changesize(int newmaxvnodes) |