lock_initalized

John Baldwin jhb at freebsd.org
Mon Aug 18 14:46:59 UTC 2008


On Sunday 17 August 2008 12:01:51 pm Matt Benjamin wrote:
> Hi all,
>
> After tracking down what I think may be a spurious panic on 8.0-CURRENT,
> I wanted to ask:
>
> a. shouldn't this be, lock_initialized?

Heh.

> b. is it safe to kassert the flag bit is unset on entry to
> mtx_init--seems this means caller has to null mtx before calling
> mtx_init (the initializer)

Correct, it's a check that was inherited from BSD/OS and means that you do 
have to bzero mtx's before initializing them (or know that your mutex is in a 
struct that is already zero'd like a device driver's softc).

-- 
John Baldwin


More information about the freebsd-current mailing list