diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-14 22:06:27 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2022-11-14 22:06:27 +0000 |
commit | 0e80454fc9892aa998a0d577e5064043c84fece4 (patch) | |
tree | 2154ffaff2ff1bdb9a6abc16ffaa7f9ffa0f0d7b /sys/net/if.c | |
parent | 6ad31bf1f283226d1072aa6013535f0c52db7a7f (diff) |
Document global interface group list locking
The per-interface group list is protected by the net lock and already
documented as such.
The global interface group list `ifg_head' is also protected by the net
lock and all access to it (all within if.c) take it accordingly.
Feedback OK mvs
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index a29a011a32b..e80b50fdf83 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.677 2022/11/10 17:17:47 dlg Exp $ */ +/* $OpenBSD: if.c,v 1.678 2022/11/14 22:06:25 kn Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -222,7 +222,8 @@ void if_idxmap_alloc(struct ifnet *); void if_idxmap_insert(struct ifnet *); void if_idxmap_remove(struct ifnet *); -TAILQ_HEAD(, ifg_group) ifg_head = TAILQ_HEAD_INITIALIZER(ifg_head); +TAILQ_HEAD(, ifg_group) ifg_head = + TAILQ_HEAD_INITIALIZER(ifg_head); /* [N] list of interface groups */ LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners); /* [I] list of clonable interfaces */ |