what to replace splnet in FreeBSD 5.x?
Sam Leffler
sam at errno.com
Sat Jul 9 17:17:54 GMT 2005
ming fu wrote:
> 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.
spl's lock execution threads. 5.x and later systems mostly lock data
structures using mtx's (there are a very few exceptions). Thus there
isn't necessarily a direct replacement, you usually need to rethink your
locking/synchronization strategy.
Sam
More information about the freebsd-net
mailing list