From e9c176f24779f794f2b4d84ff880a7682c36d086 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 20 Jun 2004 21:39:46 +0000 Subject: Annotate so_state as locked with SOCK_LOCK(so). Add a commenting indicating that the SB_ constants apply to sb_flags. --- sys/sys/socketvar.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index ee6af8a..8173715 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -61,7 +61,7 @@ struct socket { short so_type; /* (a) generic type, see socket.h */ short so_options; /* from socket call, see socket.h */ short so_linger; /* time to linger while closing */ - short so_state; /* internal state flags SS_* */ + short so_state; /* (b) internal state flags SS_* */ int so_qstate; /* (e) internal state flags SQ_* */ void *so_pcb; /* protocol control block */ struct protosw *so_proto; /* (a) protocol handle */ @@ -111,6 +111,9 @@ struct socket { short sb_flags; /* (c/d) flags, see below */ short sb_state; /* (c/d) socket state on sockbuf */ } so_rcv, so_snd; +/* + * Constants for sb_flags field of struct sockbuf. + */ #define SB_MAX (256*1024) /* default for max chars in sockbuf */ #define SB_LOCK 0x01 /* lock on data queue */ #define SB_WANT 0x02 /* someone is waiting to lock */ -- cgit v1.1