Date: Tue, 15 Nov 2011 23:37:15 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r227544 - user/attilio/vmcontention/sys/vm Message-ID: <201111152337.pAFNbF0L021744@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Nov 15 23:37:15 2011 New Revision: 227544 URL: http://svn.freebsd.org/changeset/base/227544 Log: Fix compilation for userland: - Use CTASSERT() only in the kernel. - the root pointer is required by struct vm_object which is accessible (maybe incorrectly?) by userland. Modified: user/attilio/vmcontention/sys/vm/vm_radix.h Modified: user/attilio/vmcontention/sys/vm/vm_radix.h ============================================================================== --- user/attilio/vmcontention/sys/vm/vm_radix.h Tue Nov 15 23:35:43 2011 (r227543) +++ user/attilio/vmcontention/sys/vm/vm_radix.h Tue Nov 15 23:37:15 2011 (r227544) @@ -44,20 +44,11 @@ #define VM_RADIX_HEIGHT 0xf /* Bits of height in root */ #define VM_RADIX_STACK 8 /* Nodes to store on stack. */ -CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); - /* Calculates maximum value for a tree of height h. */ #define VM_RADIX_MAX(h) \ ((h) == VM_RADIX_LIMIT ? ((vm_pindex_t)-1) : \ (((vm_pindex_t)1 << ((h) * VM_RADIX_WIDTH)) - 1)) -#ifdef _KERNEL - -struct vm_radix_node { - void *rn_child[VM_RADIX_COUNT]; /* child nodes. */ - uint16_t rn_count; /* Valid children. */ -}; - /* * Radix tree root. The height and pointer are set together to permit * coherent lookups while the root is modified. @@ -66,6 +57,14 @@ struct vm_radix { uintptr_t rt_root; /* root + height */ }; +#ifdef _KERNEL +CTASSERT(VM_RADIX_HEIGHT >= VM_RADIX_LIMIT); + +struct vm_radix_node { + void *rn_child[VM_RADIX_COUNT]; /* child nodes. */ + uint16_t rn_count; /* Valid children. */ +}; + void vm_radix_init(void); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111152337.pAFNbF0L021744>