Whitespace-only restyling of socket reference count macros.

This commit is contained in:
Robert Watson 2004-06-12 18:37:29 +00:00
parent f6c0cce6d9
commit 25928771d8

View File

@ -315,31 +315,31 @@ struct xsocket {
* still explicitly close the socket, but the last ref count will free * still explicitly close the socket, but the last ref count will free
* the structure. * the structure.
*/ */
#define soref(so) do { \ #define soref(so) do { \
++(so)->so_count; \ ++(so)->so_count; \
} while (0) } while (0)
#define sorele(so) do { \ #define sorele(so) do { \
if ((so)->so_count <= 0) \ if ((so)->so_count <= 0) \
panic("sorele");\ panic("sorele"); \
if (--(so)->so_count == 0)\ if (--(so)->so_count == 0) \
sofree(so); \ sofree(so); \
} while (0) } while (0)
#define sotryfree(so) do { \ #define sotryfree(so) do { \
if ((so)->so_count == 0) \ if ((so)->so_count == 0) \
sofree(so); \ sofree(so); \
} while(0) } while(0)
#define sorwakeup(so) do { \ #define sorwakeup(so) do { \
if (sb_notify(&(so)->so_rcv)) \ if (sb_notify(&(so)->so_rcv)) \
sowakeup((so), &(so)->so_rcv); \ sowakeup((so), &(so)->so_rcv); \
} while (0) } while (0)
#define sowwakeup(so) do { \ #define sowwakeup(so) do { \
if (sb_notify(&(so)->so_snd)) \ if (sb_notify(&(so)->so_snd)) \
sowakeup((so), &(so)->so_snd); \ sowakeup((so), &(so)->so_snd); \
} while (0) } while (0)
#ifdef _KERNEL #ifdef _KERNEL