Module Name: src
Committed By: riastradh
Date: Fri Feb 24 11:02:45 UTC 2023
Modified Files:
src/sys/net: if.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.528 -r1.529 src/sys/net/if.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.528 src/sys/net/if.c:1.529
--- src/sys/net/if.c:1.528 Fri Nov 25 06:18:42 2022
+++ src/sys/net/if.c Fri Feb 24 11:02:45 2023
@@ -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 @@ ifafree(struct ifaddr *ifa)
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);
}