From 58a458515f9988d0d5596fac240402193a591fb0 Mon Sep 17 00:00:00 2001 From: dillon Date: Mon, 19 Nov 2001 00:20:36 +0000 Subject: cast hashing index to (int)(intptr_t) for calculation. mtx_init() with MTX_QUIET and MTX_NOWITNESS to avoid bogus warnings --- sys/kern/kern_mtxpool.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/kern_mtxpool.c') diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c index 3267023..ee1b64b 100644 --- a/sys/kern/kern_mtxpool.c +++ b/sys/kern/kern_mtxpool.c @@ -51,9 +51,9 @@ static __inline struct mtx * _mtx_pool_find(void *ptr) { - uintptr_t p; + int p; - p = (uintptr_t)ptr; + p = (int)(uintptr_t)ptr; return(&mtx_pool_ary[(p ^ (p >> 6)) & MTX_POOL_MASK]); } @@ -63,7 +63,7 @@ mtx_pool_setup(void *dummy __unused) int i; for (i = 0; i < MTX_POOL_SIZE; ++i) - mtx_init(&mtx_pool_ary[i], "pool mutex", MTX_DEF); + mtx_init(&mtx_pool_ary[i], "pool mutex", MTX_DEF | MTX_NOWITNESS | MTX_QUIET); mtx_pool_valid = 1; } -- cgit v1.1