diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-08 18:43:23 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-08 18:43:23 +0000 |
commit | bfd9b924c68c6ac6d2bcb653a3a6fff01ac6605f (patch) | |
tree | d28d6d88235bf7c5769d8e383228911f1c50185a /sys/net/if_var.h | |
parent | f1d2b107b5849858901f272148fca97750a1af5f (diff) |
Document ifc_list immutability
Move up to comment explaining different locks to account for all structs.
OK millert mvs
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r-- | sys/net/if_var.h | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 28514a0bfcd..bf4adfbc744 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_var.h,v 1.117 2022/09/08 10:22:06 kn Exp $ */ +/* $OpenBSD: if_var.h,v 1.118 2022/11/08 18:43:22 kn Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -73,6 +73,18 @@ * interfaces. These routines live in the files if.c and route.c */ +/* + * Locks used to protect struct members in this file: + * I immutable after creation + * d protection left do the driver + * c only used in ioctl or routing socket contexts (kernel lock) + * K kernel lock + * N net lock + * + * For SRP related structures that allow lock-free reads, the write lock + * is indicated below. + */ + struct rtentry; struct ifnet; struct task; @@ -82,7 +94,7 @@ struct cpumem; * Structure describing a `cloning' interface. */ struct if_clone { - LIST_ENTRY(if_clone) ifc_list; /* on list of cloners */ + LIST_ENTRY(if_clone) ifc_list; /* [I] on list of cloners */ const char *ifc_name; /* name of device, e.g. `gif' */ size_t ifc_namelen; /* length of name */ @@ -100,17 +112,6 @@ struct if_clone { } /* - * Locks used to protect struct members in this file: - * I immutable after creation - * d protection left do the driver - * c only used in ioctl or routing socket contexts (kernel lock) - * K kernel lock - * N net lock - * - * For SRP related structures that allow lock-free reads, the write lock - * is indicated below. - */ -/* * Structure defining a queue for a network interface. * * (Would like to call this struct ``if'', but C isn't PL/1.) |