diff options
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 2f6ccc5..3326119 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -340,13 +340,16 @@ thread_free(struct thread *td) int thread_export_context(struct thread *td) { - struct proc *p = td->td_proc; + struct proc *p; struct ksegrp *kg; uintptr_t mbx; void *addr; int error; ucontext_t uc; + p = td->td_proc; + kg = td->td_ksegrp; + /* Export the user/machine context. */ #if 0 addr = (caddr_t)td->td_mailbox + @@ -377,7 +380,6 @@ thread_export_context(struct thread *td) * Put the saved address of the previous first * entry into this one */ - kg = td->td_ksegrp; for (;;) { mbx = (uintptr_t)kg->kg_completed; if (suword(addr, mbx)) { |