Include a SYSUNINIT() to destroy the mutex in MTX_SYSINIT. This makes

MTX_SYSINIT mutexes play well with modules that can be unloaded.

Reported by:	sam
MFC after:	3 days
This commit is contained in:
John Baldwin 2005-08-02 20:50:45 +00:00
parent a5de1230a9
commit 9d61a2e638
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148650

View File

@ -418,7 +418,9 @@ struct mtx_args {
(opts) \
}; \
SYSINIT(name##_mtx_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
mtx_sysinit, &name##_args)
mtx_sysinit, &name##_args); \
SYSUNINIT(name##_mtx_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \
mtx_destroy, (mtx))
/*
* The INVARIANTS-enabled mtx_assert() functionality.