Re: lock_initalized

From: John Baldwin <jhb_at_freebsd.org>
Date: Mon, 18 Aug 2008 10:10:13 -0400
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
Received on Mon Aug 18 2008 - 12:46:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC