Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Aug 2008 10:10:13 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Cc:        Matt Benjamin <matt@linuxbox.com>
Subject:   Re: lock_initalized
Message-ID:  <200808181010.14064.jhb@freebsd.org>
In-Reply-To: <48A84B6F.3090409@linuxbox.com>
References:  <48A84B6F.3090409@linuxbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808181010.14064.jhb>