From owner-freebsd-hackers Fri Sep 29 15:22:55 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id PAA05740 for hackers-outgoing; Fri, 29 Sep 1995 15:22:55 -0700 Received: from muse.microunity.com (muse1.microunity.com [192.216.206.2]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id PAA05730 for ; Fri, 29 Sep 1995 15:22:52 -0700 Received: from gaea.microunity.com by muse.microunity.com (4.1/ericm1.1) id AA06279; Fri, 29 Sep 95 15:22:15 PDT Received: from gallifrey (gallifrey.microunity.com) by gaea.microunity.com (4.1/muse1.3) id AA26222; Fri, 29 Sep 95 15:22:13 PDT Received: by gallifrey (931110.SGI.ANONFTP/muse-sgi.2) for @gaea.microunity.com:freebsd-hackers@freebsd.org id AA29660; Fri, 29 Sep 95 15:22:12 -0700 Date: Fri, 29 Sep 95 15:22:12 -0700 From: deborah@gallifrey.microunity.com (Deborah Gronke Bennett) Message-Id: <9509292222.AA29660@gallifrey> To: freebsd-hackers@freebsd.org Subject: spl'ing to a specific interrupt level Sender: owner-hackers@freebsd.org Precedence: bulk I'm writing a device driver for a device which is not a bio device, not a tty device and not a net device. Thus when I config the device I use none of these keywords, and my interrupt level is not added to any of the masks. What I want to know is how I can spl to my specific interrupt level around critical sections. I'm most recently familiar with SunOS, where I did something like this: saved_ipl = splx(spl_level_of_my_device); ... critical section here ... (void) splx(saved_ipl) The effect of this was to raise the interrupt level mask to the level of my device while I was in a critical section, and restore it to whatever it was before at the end. I've perused the FreeBSD 2.0.5 source tree, and all I can find is the splbio, spltty, etc macros defined with GENSPL in /include/spl.h, which are all for specific group classes. Am I forced to add myself of one of the bio, tty or net classes if I want to block interrupts during a critical section in this way? Or have I missed something? (Pointers to which source file to find this in are welcome). Thanks for your help, -deborah bennett ---------- Deborah Gronke Bennett (WD5HJH) kernel and device drivers engineer deborah@microunity.com (408)-734-8100 MicroUnity Systems Eng., 255 Caspian Drive, Sunnyvale, CA 94089-1015 USA I'm still looking to buy source code for the cscope program or the C programmer's toolchest containing it. UNIX is a trademark of whoever bought it this week . . .