Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern pcq(9): Explain why store need not be atomic in pcq...
details: https://anonhg.NetBSD.org/src/rev/bff767b7127c
branches: trunk
changeset: 373657:bff767b7127c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Thu Feb 23 03:01:35 2023 +0000
description:
pcq(9): Explain why store need not be atomic in pcq_get.
No functional change intended.
diffstat:
sys/kern/subr_pcq.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r 649eeac6ad6c -r bff767b7127c sys/kern/subr_pcq.c
--- a/sys/kern/subr_pcq.c Thu Feb 23 03:01:22 2023 +0000
+++ b/sys/kern/subr_pcq.c Thu Feb 23 03:01:35 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_pcq.c,v 1.15 2023/02/23 03:01:22 riastradh Exp $ */
+/* $NetBSD: subr_pcq.c,v 1.16 2023/02/23 03:01:35 riastradh Exp $ */
/*-
* Copyright (c) 2009, 2019 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.15 2023/02/23 03:01:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pcq.c,v 1.16 2023/02/23 03:01:35 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -168,6 +168,10 @@
*/
return NULL;
}
+ /*
+ * We have exclusive access to this slot, so no need for
+ * atomic_store_*.
+ */
pcq->pcq_items[c] = NULL;
c = pcq_advance(pcq, c);
nv = pcq_combine(p, c);
Home |
Main Index |
Thread Index |
Old Index