From 91e45cce19575e10121e135c01632cd8bf3b371d Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 27 Jun 2004 03:23:09 +0000 Subject: [PATCH] Annotate so_gencnt field of struct socket locked by so_global_mtx. --- sys/sys/socketvar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index a8c7449af46c..fb817924a27f 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -55,6 +55,7 @@ typedef u_quad_t so_gen_t; * (e) locked by ACCEPT_LOCK(). * (f) not locked since integer reads/writes are atomic. * (g) used only as a sleep/wakeup address, no value. + * (h) locked by global mutex so_global_mtx. */ struct socket { int so_count; /* (b) reference count */ @@ -134,7 +135,7 @@ struct socket { struct label *so_label; /* (b) MAC label for socket */ struct label *so_peerlabel; /* (b) cached MAC label for peer */ /* NB: generation count must not be first; easiest to make it last. */ - so_gen_t so_gencnt; /* generation count */ + so_gen_t so_gencnt; /* (h) generation count */ void *so_emuldata; /* private data for emulators */ struct so_accf { struct accept_filter *so_accept_filter;