Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net sys/net/if.c: Eliminate __HAVE_ATOMIC_AS_MEMBAR cond...
details: https://anonhg.NetBSD.org/src/rev/bee8e23c61e6
branches: trunk
changeset: 373680:bee8e23c61e6
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Feb 24 11:02:45 2023 +0000
description:
sys/net/if.c: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html
diffstat:
sys/net/if.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diffs (33 lines):
diff -r 43a765c88c88 -r bee8e23c61e6 sys/net/if.c
--- a/sys/net/if.c Fri Feb 24 11:02:27 2023 +0000
+++ b/sys/net/if.c Fri Feb 24 11:02:45 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.528 2022/11/25 06:18:42 msaitoh Exp $ */
+/* $NetBSD: if.c,v 1.529 2023/02/24 11:02:45 riastradh Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.528 2022/11/25 06:18:42 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529 2023/02/24 11:02:45 riastradh Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1797,14 +1797,10 @@
KASSERT(ifa != NULL);
KASSERTMSG(ifa->ifa_refcnt > 0, "ifa_refcnt=%d", ifa->ifa_refcnt);
-#ifndef __HAVE_ATOMIC_AS_MEMBAR
membar_release();
-#endif
if (atomic_dec_uint_nv(&ifa->ifa_refcnt) != 0)
return;
-#ifndef __HAVE_ATOMIC_AS_MEMBAR
membar_acquire();
-#endif
free(ifa, M_IFADDR);
}
Home |
Main Index |
Thread Index |
Old Index