From owner-freebsd-current Thu Nov 8 7:39:35 2001 Delivered-To: freebsd-current@freebsd.org Received: from ns.kobe1995.net (211.12.126.15.user.dt.il24.net [211.12.126.15]) by hub.freebsd.org (Postfix) with ESMTP id 9AEEF37B405 for ; Thu, 8 Nov 2001 07:39:31 -0800 (PST) Received: (from kaz@localhost) by ns.kobe1995.net (8.8.8/3.7W-primary) id AAA14862; Fri, 9 Nov 2001 00:39:00 +0900 (JST) Date: Fri, 9 Nov 2001 00:39:00 +0900 (JST) Message-Id: <200111081539.AAA14862@ns.kobe1995.net> To: rizzo@aciri.org Cc: current@freebsd.org Subject: Re: when to use XX_LOCK() ? In-Reply-To: Your message of "Mon, 5 Nov 2001 14:26:48 -0800". <20011105142648.E76687@iguana.aciri.org> From: kaz@kobe1995.net (NAKAMURA Kazushi) X-Mailer: mnews [version 1.20] 1996-12/08(Sun) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20011105142648.E76687@iguana.aciri.org> rizzo@aciri.org writes: >In if_dc.c and other places, i see sequences like this: > > dc_intr(arg) { > struct dc_softc sc; > > sc = arg; > DC_LOCK(sc); > ifp = &sc->arpcom.ac_if; > ... > >Wondering: any reason to call DC_LOCK before assigning a value to ifp ? It is a lock for the SMPng, isn't it? I see that 5-current is removing the giant-lock, replace into small locks. -- NAKAMURA Kazushi@KOBE - Break the hate chain. No more kill! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message