Module Name: src
Committed By: riastradh
Date: Thu Apr 11 13:51:36 UTC 2024
Modified Files:
src/sys/kern: sys_futex.c
Log Message:
sys_futex.c: Fix illustration of futex(2).
In this illustration, we need to _set_ bit 1 to claim ownership, not
_clear_ bit 1 to claim ownership.
No functional change intended -- comment only.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 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.19 src/sys/kern/sys_futex.c:1.20
--- src/sys/kern/sys_futex.c:1.19 Fri Feb 24 11:02:27 2023
+++ src/sys/kern/sys_futex.c Thu Apr 11 13:51:36 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_futex.c,v 1.19 2023/02/24 11:02:27 riastradh Exp $ */
+/* $NetBSD: sys_futex.c,v 1.20 2024/04/11 13:51:36 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.19 2023/02/24 11:02:27 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_futex.c,v 1.20 2024/04/11 13:51:36 riastradh Exp $");
/*
* Futexes
@@ -62,7 +62,7 @@ __KERNEL_RCSID(0, "$NetBSD: sys_futex.c,
* futex(FUTEX_WAIT, &lock, v | 2, NULL, NULL, 0);
* continue;
* }
- * } while (atomic_cas_uint(&lock, v, v & ~1) != v);
+ * } while (atomic_cas_uint(&lock, v, v | 1) != v);
* membar_acquire();
*
* ...