Hi,

dev_lock() looks this way:

void
dev_lock(void)
{
        if (!mtx_initialized(&devmtx))
                mtx_init(&devmtx, "cdev", NULL, MTX_DEF);
        mtx_lock(&devmtx);
}

I wonder why is the mtx_initialized checking necessary? shouldnt explicit
initialization be sufficient?

thnx for answer

roman
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to