Date: Mon, 1 Apr 2002 23:24:11 -0800 From: Alfred Perlstein <bright@mu.org> To: "Andrew R. Reiter" <arr@FreeBSD.org> Cc: smp@FreeBSD.org Subject: Re: Where to initialize certain locks... Message-ID: <20020402072411.GH93885@elvis.mu.org> In-Reply-To: <Pine.NEB.3.96L.1020402021451.18134G-100000@fledge.watson.org> References: <20020402071440.GF93885@elvis.mu.org> <Pine.NEB.3.96L.1020402021451.18134G-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Andrew R. Reiter <arr@FreeBSD.org> [020401 23:19] wrote: > On Mon, 1 Apr 2002, Alfred Perlstein wrote: > > :* Andrew R. Reiter <arr@FreeBSD.org> [020401 22:16] 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? > : > :SYSINIT should work provided you run them after the mutex subsystem is > :setup. :) > > Well, yes :-) My main concern is that I kind of fear starting to > encounter a number of these situations as we go along and need to now have > a number of SYSINITs, each of which only is there to initialize a single > mutex -- also the issue of where to put the SYSINITs (and the related > code). Is this something Im just over thinking about? :-)) Your concern is valid, perhaps a macro that automagically makes a sysinit to init a mutex? Sort of like the "SYSCALL_MODULE_HELPER" stuff, but not as ugly? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.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?20020402072411.GH93885>