diff options
author | 2012-04-12 14:40:41 +0000 | |
---|---|---|
committer | 2012-04-12 14:40:41 +0000 | |
commit | 058657a11122f0712e9a19f23ffe31a7967dc233 (patch) | |
tree | 3bf8382f8b67d829eef10946a67fdf9ea1a2c4cc /sys/kern/subr_hibernate.c | |
parent | Clarify thread-localness in the wake of rfork's removal (diff) | |
download | wireguard-openbsd-058657a11122f0712e9a19f23ffe31a7967dc233.tar.xz wireguard-openbsd-058657a11122f0712e9a19f23ffe31a7967dc233.zip |
If the "main" thread exits it stays around but unlinks itself from the
threads list. Calling TAILQ_NEXT on them is a bad idea and will panic
the kernel. So check the P_WEXIT flag and pretend the thread doesn't
exist if it is set. Also make PT_GET_THREAD_FIRST return the first
thread on the threads list instead of the "main" thread, such that you
can actually keep enumerating the threads in this case.
ok guenther@, miod@
Diffstat (limited to 'sys/kern/subr_hibernate.c')
0 files changed, 0 insertions, 0 deletions