dev_lock() question
From: Divacky Roman (xdivac02_at_stud.fit.vutbr.cz)
Date: 09/29/05
- Previous message: Z.C.B.: "Re: journaling fs and large mailbox format"
- Next in thread: Stanislav Sedov: "Re: dev_lock() question"
- Reply: Stanislav Sedov: "Re: dev_lock() question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Sep 2005 18:55:38 +0200 To: hackers@freebsd.org
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 "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Z.C.B.: "Re: journaling fs and large mailbox format"
- Next in thread: Stanislav Sedov: "Re: dev_lock() question"
- Reply: Stanislav Sedov: "Re: dev_lock() question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|