Module Name: src
Committed By: riastradh
Date: Thu Apr 21 12:05:13 UTC 2022
Modified Files:
src/sys/kern: sys_futex.c
Log Message:
futex(9): Convert membar_enter/exit to membar_acquire/release.
No functional change -- this is just in an illustrative comment!
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/kern/sys_futex.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/kern/sys_futex.c
diff -u src/sys/kern/sys_futex.c:1.17 src/sys/kern/sys_futex.c:1.18
--- src/sys/kern/sys_futex.c:1.17 Sat Apr 9 23:38:33 2022
+++ src/sys/kern/sys_futex.c Thu Apr 21 12:05:13 2022
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sys_futex.c,
* 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);