cast hashing index to (int)(intptr_t) for calculation.

mtx_init() with MTX_QUIET and MTX_NOWITNESS to avoid bogus warnings
This commit is contained in:
Matthew Dillon 2001-11-19 00:20:36 +00:00
parent 125ccd2e6d
commit 849948a7cd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86563

View File

@ -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;
}