Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in
order to avoid otherwise harmless witness warnings when these are acquired at the same time and due to both using MTX_NETWORK_LOCK as their type. The right fix actually would be to use different, descriptive types for these. However, the latter would require undesirable changes to the shared code base. Another approach would be to just supply NULL as the type, which was deemed as less desirable though as it would cause the unique but cryptic name also to be used for the type and to diverge from the type used by other network device drivers. MFC after: 1 week
This commit is contained in:
parent
3030137a23
commit
b3f46df007
@ -84,7 +84,8 @@
|
||||
/* Mutex used in the shared code */
|
||||
#define E1000_MUTEX struct mtx
|
||||
#define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \
|
||||
MTX_NETWORK_LOCK, MTX_DEF)
|
||||
MTX_NETWORK_LOCK, \
|
||||
MTX_DEF | MTX_DUPOK)
|
||||
#define E1000_MUTEX_DESTROY(mutex) mtx_destroy(mutex)
|
||||
#define E1000_MUTEX_LOCK(mutex) mtx_lock(mutex)
|
||||
#define E1000_MUTEX_TRYLOCK(mutex) mtx_trylock(mutex)
|
||||
|
Loading…
Reference in New Issue
Block a user