diff options
author | julian <julian@FreeBSD.org> | 2007-10-26 08:00:41 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2007-10-26 08:00:41 +0000 |
commit | 11e1aa0d189878b719971121400f0678e7ccb2aa (patch) | |
tree | e047e33390a9aae820357c54ff8602bc8faad475 /bin/ps/extern.h | |
parent | 050649d6404e24b1beaba91f04f9008ad5acd6a5 (diff) | |
download | FreeBSD-src-11e1aa0d189878b719971121400f0678e7ccb2aa.zip FreeBSD-src-11e1aa0d189878b719971121400f0678e7ccb2aa.tar.gz |
Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.
kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.
All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.
fix top to show kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.
make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'
man page fixes to follow.
Diffstat (limited to 'bin/ps/extern.h')
-rw-r--r-- | bin/ps/extern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ps/extern.h b/bin/ps/extern.h index 08b6d9b..89b5835 100644 --- a/bin/ps/extern.h +++ b/bin/ps/extern.h @@ -39,7 +39,7 @@ extern fixpt_t ccpu; extern int cflag, eval, fscale, nlistread, rawcpu; extern unsigned long mempages; extern time_t now; -extern int sumrusage, termwidth, totwidth; +extern int showthreads, sumrusage, termwidth, totwidth; extern STAILQ_HEAD(velisthead, varent) varlist; __BEGIN_DECLS @@ -78,6 +78,7 @@ int s_uname(KINFO *); void showkey(void); void started(KINFO *, VARENT *); void state(KINFO *, VARENT *); +void tdnam(KINFO *, VARENT *); void tdev(KINFO *, VARENT *); void tname(KINFO *, VARENT *); void ucomm(KINFO *, VARENT *); |