From owner-freebsd-hackers Mon Mar 20 17:46:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.79.126]) by hub.freebsd.org (Postfix) with ESMTP id 5950037C0DD for ; Mon, 20 Mar 2000 17:46:17 -0800 (PST) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.79.115]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id SAA28421; Mon, 20 Mar 2000 18:46:02 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id SAA17825; Mon, 20 Mar 2000 18:46:01 -0700 (MST) (envelope-from nate) Date: Mon, 20 Mar 2000 18:46:01 -0700 (MST) Message-Id: <200003210146.SAA17825@nomad.yogotech.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Wes Peters Cc: Warner Losh , Guido van Rooij , hackers@FreeBSD.ORG Subject: Re: splFoo() question In-Reply-To: <38D6C5EB.E96A6514@softweyr.com> References: <20000320210008.A59405@gvr.gvr.org> <200003182031.NAA97975@harmony.village.org> <200003202057.NAA17486@harmony.village.org> <38D6C5EB.E96A6514@softweyr.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > : perhaps we need some mutex mechanism? > > > > Yes. Right now the mutex mechanism that we have is blocking of > > interrupts when the bit is set in the cpl. I guess I'm a little too > > close to the mechanism and need to step back. > > > > You are right that I'm asking for a call that is approximately "block > > my interrupt handler from running until I say it is ok." A more > > generalized mutex/locking scheme is needed so that I can just grab a > > mutex in my code and in my ISR and the right thing will just happen. > > A per-driver mutex, perhaps? This would save us from potential > deadly embraces within a single driver, at least. The only concern I can see is that currently it requires you to get too cozy with the machine independant code. Basically, the 'resource' that you want to lock on is the IRQ, and the raw IRQ code is quite machine dependant. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message