From de9ac44a241e93b2cb864eeda619d0a3026c3063 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 8 Feb 2002 02:56:10 +0000 Subject: [PATCH] Fix a fatal trap when using ksched_setscheduler() (eg: mozilla, netscape etc) which use: td->td_last_kse->ke_flags |= KEF_NEEDRESCHED; --- sys/kern/kern_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index e3be9a15fcc7..54caef252045 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -122,7 +122,7 @@ thread_link(struct thread *td, struct ksegrp *kg) td->td_proc = p; td->td_ksegrp = kg; - td->td_last_kse = NULL; + td->td_last_kse = &p->p_kse; TAILQ_INSERT_HEAD(&p->p_threads, td, td_plist); TAILQ_INSERT_HEAD(&kg->kg_threads, td, td_kglist);