From owner-freebsd-smp Mon Dec 4 14:46:20 2000 From owner-freebsd-smp@FreeBSD.ORG Mon Dec 4 14:46:19 2000 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 8DF5E37B400; Mon, 4 Dec 2000 14:46:18 -0800 (PST) Received: from laptop.baldwin.cx (root@dhcp246.osd.bsdi.com [204.216.28.246]) by pike.osd.bsdi.com (8.11.1/8.9.3) with ESMTP id eB4MjsC19112; Mon, 4 Dec 2000 14:45:54 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200012042250.eB4Mo7F01738@mass.osd.bsdi.com> Date: Mon, 04 Dec 2000 14:46:30 -0800 (PST) From: John Baldwin To: Mike Smith Subject: Re: Netgraph and SMP Cc: smp@FreeBSD.org, phk@FreeBSD.org, archie@FreeBSD.org, brian@FreeBSD.org, Julian Elischer , Brian Somers Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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 -- 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