Separate ssb_lock() and ssb_unlock() into its own header file and reimplement
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 7 Nov 2007 18:24:06 +0000 (18:24 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 7 Nov 2007 18:24:06 +0000 (18:24 +0000)
commitd6cb521dfca438d1b61d66240c146df999266fbe
tree983309f9acf1d1c1c438bb304f60ad1b76c46429
parent4db955e1d8c2d0d7545b6f53eac20fa7357428be
Separate ssb_lock() and ssb_unlock() into its own header file and reimplement
the macro as an inline.  Using the DragonFly '2' notation for header files
containing potentially complex inlines.

Correct an extremely old bug that caused ssb_lock() to always return success,
even when it failed.   This could have been responsible for miscellanious
random network bug reports over the years.

Reported-by: Johannes Hofmann <Johannes.Hofmann@gmx.de>
Taken-from: FreeBSD using the inline suggested by OpenBSD
sys/kern/uipc_socket.c
sys/kern/uipc_syscalls.c
sys/sys/socketvar.h
sys/sys/socketvar2.h [new file with mode: 0644]