Annotate so_error as being used for simple assignment and reads, and

therefore not locked.

Assert the socket buffer lock in sowwakeup_locked() to match
sorwakeup_locked().
This commit is contained in:
Robert Watson 2004-06-24 04:27:10 +00:00
parent 5e609009de
commit 63a9224f4c

View File

@ -85,7 +85,7 @@ struct socket {
connections */
short so_qlimit; /* (e) max number queued connections */
short so_timeo; /* (g) connection timeout */
u_short so_error; /* error affecting connection */
u_short so_error; /* (f) error affecting connection */
struct sigio *so_sigio; /* [sg] information for async I/O or
out of band data (SIGURG) */
u_long so_oobmark; /* (c) chars to oob mark */
@ -381,6 +381,7 @@ struct xsocket {
} while (0)
#define sowwakeup_locked(so) do { \
SOCKBUF_LOCK_ASSERT(&(so)->so_snd); \
if (sb_notify(&(so)->so_snd)) \
sowakeup((so), &(so)->so_snd); \
else \