Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 09 Jul 2005 18:29:57 +0400
From:      Roman Kurakin <rik@cronyx.ru>
To:        ming fu <fming@borderware.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: what to replace splnet in FreeBSD 5.x?
Message-ID:  <42CFDF65.40400@cronyx.ru>
In-Reply-To: <42CEF0EB.4000107@borderware.com>
References:  <42CEF0EB.4000107@borderware.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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"






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42CFDF65.40400>