From owner-freebsd-questions Fri Feb 9 8:31: 1 2001 Delivered-To: freebsd-questions@freebsd.org Received: from stewart.chicago.il.us (dsl-64-128-23-213.telocity.com [64.128.23.213]) by hub.freebsd.org (Postfix) with ESMTP id 9EEC337BBE4 for ; Fri, 9 Feb 2001 07:45:02 -0800 (PST) Received: from stewart.chicago.il.us (IDENT:randall@stewart.chicago.il.us [10.1.1.1]) by stewart.chicago.il.us (8.9.3/8.8.7) with ESMTP id JAA23023 for ; Fri, 9 Feb 2001 09:45:28 -0600 Message-ID: <3A841098.61D7BDC9@stewart.chicago.il.us> Date: Fri, 09 Feb 2001 09:45:28 -0600 From: "Randall R. Stewart" X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@FreeBSD.org Subject: Question about spl() and friends AND disable/enable interupts Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello: It has been years since I have poked around in kernel lands... and now I find myself doing so again :) Now I have a very basic and probably dumb question.. I am busy hacking/fixing the an driver.. attempting to get it to align to the 4800 specification I have... And I notice no use of the splx() and friends. Further I hunted a bit and find that all of the spl...() ilk have been macro'd to 'return(0);' Now here is my question(s): A) When a driver needs to disable interupts how does it do so? - For now I am only disabling the Airo card from interupting but I think this is a real problem since there is a race in the command register access. B) Is the mtx_enter() mtx_exit() supposed be the new replacement for interupt. I glanced at this code, and I do note a disable_intr() when it is from a lowerlayer type driver... but I am not sure this helps protect the user making a query... Worse, if a user side process does say a ancontrol command and thus has a lock, a interupt hits, does the interupt handler have to wait, since it too does a mtx_enter? This all seems strange in my old grey cells. Pointers or comments would be most welcome.. thanks R -- Randall R. Stewart randall@stewart.chicago.il.us or rrs@cisco.com 815-342-5222 (cell) 815-477-2127 (work) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message