Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 Apr 2002 11:09:10 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        smp@FreeBSD.org, "Andrew R. Reiter" <arr@FreeBSD.org>
Subject:   Re: Where to initialize certain locks...
Message-ID:  <XFMail.20020402110910.jhb@FreeBSD.org>
In-Reply-To: <3CA96D93.3DAE8C58@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 02-Apr-2002 Terry Lambert wrote:
> "Andrew R. Reiter" wrote:
>> 
>> I've been looking at some global values that are not associated with any
>> one subsystem, but need a lock at some point in order to guarantee correct
>> bheavior -- specifically, at the moment, the securelevel value.  I do not
>> right away see a clean place for the related lock to be initialized... Am
>> I missing some SYSINIT() (or SYSINIT()s) that are meant for helping to
>> initialize locks in this type of situation while still
>> protecting/promoting correct order (to ensure we init prior to a lock
>> attempt)?  Or is that not a good path to go down?
> 
> Initialized to what non-default setting?
> 
> Initializing a lock as locked is a bad idea.  Initializing it as
> unlocked is, well, automatic.

No it's not.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




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