Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 04 Dec 2000 14:46:30 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Mike Smith <msmith@FreeBSD.org>
Cc:        smp@FreeBSD.org, phk@FreeBSD.org, archie@FreeBSD.org, brian@FreeBSD.org, Julian Elischer <julian@elischer.org>, Brian Somers <brian@Awfulhak.org>
Subject:   Re: Netgraph and SMP
Message-ID:  <XFMail.001204144630.jhb@FreeBSD.org>
In-Reply-To: <200012042250.eB4Mo7F01738@mass.osd.bsdi.com>

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

On 04-Dec-00 Mike Smith wrote:
>> > The simplest structure for this is a shared/exclusive lock 
>> > that supports intention; Terry would have ranted about this. (He would 
>> > have called it a SIX-lock, I think).
>> [.....]
>> > This may sound simplistic, but given that you don't necessarily make 
>> > changes to Netgraph very often, this is quite likely more than adequate 
>> > for now.
>> 
>> Nice, I never realised there were shared/exclusive locks available.  
>> I think netgraph nodes would also need to have a ``modevent'' that 
>> fails MOD_UNLOAD events if any locks are outstanding.
> 
> Er, no, you just have to acquire the exclusive lock in the MOD_UNLOAD 
> handler.
> 
> As for the actual availibility of SIX-style locks; I'm fairly sure you 
> can do this with the lockmgr.

Yes.  See the allproc_lock as an example.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"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.001204144630.jhb>