Use mtx_initiaalized() rather than violating the internals of the mutex
structure.
This commit is contained in:
parent
116b99dcbc
commit
ae991ce0b7
@ -117,8 +117,7 @@ ifinit(dummy)
|
||||
ifp->if_name, ifp->if_unit);
|
||||
ifp->if_snd.ifq_maxlen = ifqmaxlen;
|
||||
}
|
||||
/* XXX This is an access violation of the mutex internals. */
|
||||
if (ifp->if_snd.ifq_mtx.mtx_description == NULL) {
|
||||
if (!mtx_initialized(&ifp->if_snd.ifq_mtx)) {
|
||||
printf("%s%d XXX: driver didn't initialize queue mtx\n",
|
||||
ifp->if_name, ifp->if_unit);
|
||||
mtx_init(&ifp->if_snd.ifq_mtx, "unknown", MTX_DEF);
|
||||
|
Loading…
Reference in New Issue
Block a user