From owner-freebsd-net@FreeBSD.ORG Sat Jul 9 14:44:57 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DA6216A41C for ; Sat, 9 Jul 2005 14:44:57 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 878F443D45 for ; Sat, 9 Jul 2005 14:44:56 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j69EfqLJ053005 for freebsd-net@freebsd.org.checked; Sat, 9 Jul 2005 18:41:52 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (localhost.cronyx.ru [127.0.0.1]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j69EdA74052993; Sat, 9 Jul 2005 18:39:10 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <42CFDF65.40400@cronyx.ru> Date: Sat, 09 Jul 2005 18:29:57 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: ming fu References: <42CEF0EB.4000107@borderware.com> In-Reply-To: <42CEF0EB.4000107@borderware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: what to replace splnet in FreeBSD 5.x? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2005 14:44:57 -0000 ming fu: > Hi, > > With splnet() became a no-op in sys/systm.h > > static __inline intrmask_t splnet(void) { return 0; } > > What should I use to replace the splnet? > > I have a module receiving input from both ip_input() and a device that > userland can write to. I guess I was cover from the ip_input() as it > should have the proper lock. However, I am on my own to figure out > what to replace the splnet() when receive from the device from the > userland. It uses splnet() in FreeBSD 4.x. You should use mutex locks instead of splnet. See for example cx(4) driver. rik > Thanks in advance, > Ming > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"