From owner-freebsd-hackers Mon Mar 20 17:56:45 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id E73F137B9F3 for ; Mon, 20 Mar 2000 17:56:40 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id SAA20701; Mon, 20 Mar 2000 18:56:29 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id SAA19697; Mon, 20 Mar 2000 18:56:19 -0700 (MST) Message-Id: <200003210156.SAA19697@harmony.village.org> To: Wes Peters Subject: Re: splFoo() question Cc: Guido van Rooij , hackers@FreeBSD.ORG In-reply-to: Your message of "Mon, 20 Mar 2000 17:44:27 MST." <38D6C5EB.E96A6514@softweyr.com> References: <38D6C5EB.E96A6514@softweyr.com> <20000320210008.A59405@gvr.gvr.org> <200003182031.NAA97975@harmony.village.org> <200003202057.NAA17486@harmony.village.org> Date: Mon, 20 Mar 2000 18:56:19 -0700 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <38D6C5EB.E96A6514@softweyr.com> Wes Peters writes: : > In message <20000320210008.A59405@gvr.gvr.org> Guido van Rooij writes: : > : 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. We kinda sorta have this right now with the interrupt routine being blocked when the cpl is too high. I'd like to see this more generalized than it is today. However, jumping in and mucking with this code makes me nervous. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message