mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 09:43:47 +00:00
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:
parent
125ccd2e6d
commit
849948a7cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=86563
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue