summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authormvs <mvs@cvs.openbsd.org>2020-09-22 19:25:28 +0000
committermvs <mvs@cvs.openbsd.org>2020-09-22 19:25:28 +0000
commitd527f54e9b61003b890a6173328b1286c7c52ed7 (patch)
treefa1c275bbeac4b866f169d1d3caee4a0d57b5331 /sys/net/rtsock.c
parentc213b6d2e05ec2ed2bf747a7c7962a580137c80a (diff)
Document locks which protect `rtpcb' struct members.
ok mpi@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index fa84ddc25e5..e6d45446534 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.300 2020/08/13 04:58:22 jmatthew Exp $ */
+/* $OpenBSD: rtsock.c,v 1.301 2020/09/22 19:25:27 mvs Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -138,18 +138,23 @@ int sysctl_iflist(int, struct walkarg *);
int sysctl_ifnames(struct walkarg *);
int sysctl_rtable_rtstat(void *, size_t *, void *);
+/*
+ * Locks used to protect struct members
+ * I immutable after creation
+ * sK solock (kernel lock)
+ */
struct rtpcb {
- struct socket *rop_socket;
+ struct socket *rop_socket; /* [I] */
SRPL_ENTRY(rtpcb) rop_list;
struct refcnt rop_refcnt;
struct timeout rop_timeout;
- unsigned int rop_msgfilter;
- unsigned int rop_flagfilter;
- unsigned int rop_flags;
- u_int rop_rtableid;
- unsigned short rop_proto;
- u_char rop_priority;
+ unsigned int rop_msgfilter; /* [sK] */
+ unsigned int rop_flagfilter; /* [sK] */
+ unsigned int rop_flags; /* [sK] */
+ u_int rop_rtableid; /* [sK] */
+ unsigned short rop_proto; /* [I] */
+ u_char rop_priority; /* [sK] */
};
#define sotortpcb(so) ((struct rtpcb *)(so)->so_pcb)