Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern futex(9): Convert membar_enter/exit to membar_acqui...
details: https://anonhg.NetBSD.org/src/rev/1c456eed4846
branches: trunk
changeset: 365727:1c456eed4846
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Apr 21 12:05:13 2022 +0000
description:
futex(9): Convert membar_enter/exit to membar_acquire/release.
No functional change -- this is just in an illustrative comment!
diffstat:
sys/kern/sys_futex.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 819f99ace019 -r 1c456eed4846 sys/kern/sys_futex.c
--- a/sys/kern/sys_futex.c Thu Apr 21 07:03:44 2022 +0000
+++ b/sys/kern/sys_futex.c Thu Apr 21 12:05:13 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_futex.c,v 1.17 2022/04/09 23:38:33 riastradh Exp $ */
+/* $NetBSD: sys_futex.c,v 1.18 2022/04/21 12:05:13 riastradh Exp $ */
/*-
* Copyright (c) 2018, 2019, 2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.17 2022/04/09 23:38:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.18 2022/04/21 12:05:13 riastradh Exp $");
/*
* Futexes
@@ -63,13 +63,13 @@
* continue;
* }
* } while (atomic_cas_uint(&lock, v, v & ~1) != v);
- * membar_enter();
+ * membar_acquire();
*
* ...
*
* // Release the lock. Optimistically assume there are
* // no waiters first until demonstrated otherwise.
- * membar_exit();
+ * membar_release();
* if (atomic_cas_uint(&lock, 1, 0) != 1) {
* // There may be waiters.
* v = atomic_swap_uint(&lock, 0);
Home |
Main Index |
Thread Index |
Old Index