Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif if_shmem(4): Use membar_acquire/re...
details: https://anonhg.NetBSD.org/src/rev/5bad7ef9ff57
branches: trunk
changeset: 365164:5bad7ef9ff57
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat Apr 09 23:45:02 2022 +0000
description:
if_shmem(4): Use membar_acquire/release for lock acquire/release.
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 162759444d7a -r 5bad7ef9ff57 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Sat Apr 09 23:44:54 2022 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Sat Apr 09 23:45:02 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.83 2021/07/14 03:16:06 ozaki-r Exp $ */
+/* $NetBSD: if_shmem.c,v 1.84 2022/04/09 23:45:02 riastradh Exp $ */
/*
* Copyright (c) 2009, 2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.83 2021/07/14 03:16:06 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.84 2022/04/09 23:45:02 riastradh Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -144,7 +144,7 @@
}
continue;
}
- membar_enter();
+ membar_acquire();
}
static void
@@ -152,7 +152,7 @@
{
unsigned int old __diagused;
- membar_exit();
+ membar_release();
old = atomic_swap_32(&busmem->shm_lock, LOCK_UNLOCKED);
KASSERT(old == LOCK_LOCKED);
}
Home |
Main Index |
Thread Index |
Old Index