Make sysctl_kern_proc() iterate through available cpus to retrieve the
authorMatthew Dillon <dillon@dragonflybsd.org>
Sat, 29 May 2004 02:47:50 +0000 (02:47 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sat, 29 May 2004 02:47:50 +0000 (02:47 +0000)
commit630ccdeb63f1df17adf25b5d030f1f519f65966b
treee2b3b9579bd54a1b2ac8b3f814d2d4aa76fe7eea
parent6bef824e1c19e7e0c59a43e2e58fe3cd5def087f
Make sysctl_kern_proc() iterate through available cpus to retrieve the
list of threads installed on each one rather then just retrieve the threads
on the cpu it happens to have been called from.

To accomplish this, sysctl_kern_proc() now uses the new LWKT API to
migrate itself to each target cpu in order to safely access the thread
list on that cpu, ending up on the same cpu it started from.  The overhead
is nasty to be sure, but who cares when only 'top' and 'ps' and related
non-critical utilities use the feature?
sys/kern/kern_proc.c