From owner-freebsd-hackers Fri May 24 08:33:38 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id IAA19357 for hackers-outgoing; Fri, 24 May 1996 08:33:38 -0700 (PDT) Received: from Root.COM (implode.Root.COM [198.145.90.17]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id IAA19297 for ; Fri, 24 May 1996 08:33:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by Root.COM (8.7.5/8.6.5) with SMTP id IAA20249; Fri, 24 May 1996 08:32:30 -0700 (PDT) Message-Id: <199605241532.IAA20249@Root.COM> X-Authentication-Warning: implode.Root.COM: Host localhost [127.0.0.1] didn't use HELO protocol To: ormonde@trem.cnt.org.br (Rodrigo Ormonde) cc: freebsd-hackers@freebsd.org Subject: Re: splnet() and splx() In-reply-to: Your message of "Fri, 24 May 1996 10:17:33 -0300." <9605241317.AA09726@trem.cnt.org.br> From: David Greenman Reply-To: davidg@Root.COM Date: Fri, 24 May 1996 08:32:30 -0700 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I'm working inside the FreeBSD kernel and sometimes I see the following >construction: (it is present in many modules) > > int s; > > s = splnet(); > > /* There is code here */ > > splx(s); > > Does anybody know what are the functions splnet() and splx() ? spl*() and splx() block and restore, respectively, specific classes of interrupts. splnet() blocks software network ASTs, for example, while splimp() blocks network device interrupts. splx() restores the previously saved state. -DG David Greenman Core-team/Principal Architect, The FreeBSD Project