summaryrefslogtreecommitdiff
path: root/lib/libkvm
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2021-02-08 10:51:03 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2021-02-08 10:51:03 +0000
commitb2724c03b5425168dcc83218f4c41d6713283d87 (patch)
treeb350585686ac6b0b1c558976239d4594e5c2b7db /lib/libkvm
parent16d10f648535cbd97acb7e1da8caae9c6734c691 (diff)
Revert the convertion of per-process thread into a SMR_TAILQ.
We did not reach a consensus about using SMR to unlock single_thread_set() so there's no point in keeping this change.
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm_proc2.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/libkvm/kvm_proc2.c b/lib/libkvm/kvm_proc2.c
index 259fdfe8ec9..7cc2adab450 100644
--- a/lib/libkvm/kvm_proc2.c
+++ b/lib/libkvm/kvm_proc2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_proc2.c,v 1.32 2020/12/07 16:55:28 mpi Exp $ */
+/* $OpenBSD: kvm_proc2.c,v 1.33 2021/02/08 10:51:01 mpi Exp $ */
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -341,9 +341,8 @@ kvm_proclist(kvm_t *kd, int op, int arg, struct process *pr,
kp.p_pctcpu = 0;
kp.p_stat = (process.ps_flags & PS_ZOMBIE) ? SDEAD :
SIDL;
- for (p = SMR_TAILQ_FIRST_LOCKED(&process.ps_threads);
- p != NULL;
- p = SMR_TAILQ_NEXT_LOCKED(&proc, p_thr_link)) {
+ for (p = TAILQ_FIRST(&process.ps_threads); p != NULL;
+ p = TAILQ_NEXT(&proc, p_thr_link)) {
if (KREAD(kd, (u_long)p, &proc)) {
_kvm_err(kd, kd->program,
"can't read proc at %lx",
@@ -377,8 +376,8 @@ kvm_proclist(kvm_t *kd, int op, int arg, struct process *pr,
if (!dothreads)
continue;
- for (p = SMR_TAILQ_FIRST_LOCKED(&process.ps_threads); p != NULL;
- p = SMR_TAILQ_NEXT_LOCKED(&proc, p_thr_link)) {
+ for (p = TAILQ_FIRST(&process.ps_threads); p != NULL;
+ p = TAILQ_NEXT(&proc, p_thr_link)) {
if (KREAD(kd, (u_long)p, &proc)) {
_kvm_err(kd, kd->program,
"can't read proc at %lx",