summaryrefslogtreecommitdiffstats
path: root/lib/libkvm/kvm_proc.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2007-10-10 15:53:51 +0000
committerart <art@openbsd.org>2007-10-10 15:53:51 +0000
commit45053f4a9c0ff11fe529cfbf9c98901ff89d8e2c (patch)
tree8892d5c7c720788fc3d9d2cba5ce3ebc1d11f09c /lib/libkvm/kvm_proc.c
parentsend_packet() now takes a struct in6_addr as destination instead of a (diff)
downloadwireguard-openbsd-45053f4a9c0ff11fe529cfbf9c98901ff89d8e2c.tar.xz
wireguard-openbsd-45053f4a9c0ff11fe529cfbf9c98901ff89d8e2c.zip
Make context switching much more MI:
- Move the functionality of choosing a process from cpu_switch into a much simpler function: cpu_switchto. Instead of having the locore code walk the run queues, let the MI code choose the process we want to run and only implement the context switching itself in MD code. - Let MD context switching run without worrying about spls or locks. - Instead of having the idle loop implemented with special contexts in MD code, implement one idle proc for each cpu. make the idle loop MI with MD hooks. - Change the proc lists from the old style vax queues to TAILQs. - Change the sleep queue from vax queues to TAILQs. This makes wakeup() go from O(n^2) to O(n) there will be some MD fallout, but it will be fixed shortly. There's also a few cleanups to be done after this. deraadt@, kettenis@ ok
Diffstat (limited to 'lib/libkvm/kvm_proc.c')
-rw-r--r--lib/libkvm/kvm_proc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 9a97d9b4e90..ff9b9b377a9 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_proc.c,v 1.34 2007/06/18 21:51:15 pedro Exp $ */
+/* $OpenBSD: kvm_proc.c,v 1.35 2007/10/10 15:53:51 art Exp $ */
/* $NetBSD: kvm_proc.c,v 1.30 1999/03/24 05:50:50 mrg Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
#if 0
static char sccsid[] = "@(#)kvm_proc.c 8.3 (Berkeley) 9/23/93";
#else
-static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.34 2007/06/18 21:51:15 pedro Exp $";
+static char *rcsid = "$OpenBSD: kvm_proc.c,v 1.35 2007/10/10 15:53:51 art Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -477,8 +477,6 @@ kvm_getproc2(kvm_t *kd, int op, int arg, size_t esize, int *cnt)
kp2p = &kp2;
for (i = 0; i < nprocs; i++, kp++) {
memset(kp2p, 0, sizeof(kp2));
- kp2p->p_forw = PTRTOINT64(kp->kp_proc.p_forw);
- kp2p->p_back = PTRTOINT64(kp->kp_proc.p_back);
kp2p->p_paddr = PTRTOINT64(kp->kp_eproc.e_paddr);
kp2p->p_addr = PTRTOINT64(kp->kp_proc.p_addr);