diff options
| author | riastradh <riastradh@NetBSD.org> | 2022-04-21 12:05:13 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2022-04-21 12:05:13 +0000 |
| commit | cf026c768fc700d2d6cae070b5b4c4feba22fa00 (patch) | |
| tree | 804ba7aded460c96f806ea7140f389d1f978bb12 /sys | |
| parent | b00bfeb074fc93fe57c48820971292d1468833dd (diff) | |
futex(9): Convert membar_enter/exit to membar_acquire/release.
No functional change -- this is just in an illustrative comment!
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/sys_futex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/sys_futex.c b/sys/kern/sys_futex.c index 9939ae8f65e..93708d2bd2a 100644 --- a/sys/kern/sys_futex.c +++ b/sys/kern/sys_futex.c @@ -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,v 1.17 2022/04/09 23:38:33 riastradh Exp * 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); |
