Use mtx_initiaalized() rather than violating the internals of the mutex

structure.
This commit is contained in:
jhb 2001-03-28 09:04:25 +00:00
parent 116b99dcbc
commit ae991ce0b7

View File

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