summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_thr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_thr.c b/sys/kern/kern_thr.c
index 5bcef04..24c6cfd 100644
--- a/sys/kern/kern_thr.c
+++ b/sys/kern/kern_thr.c
@@ -201,6 +201,8 @@ create_thread(struct thread *td, mcontext_t *ctx,
goto fail;
}
+ cpu_set_upcall(newtd, td);
+
/*
* Try the copyout as soon as we allocate the td so we don't
* have to tear things down in a failure case below.
@@ -226,8 +228,6 @@ create_thread(struct thread *td, mcontext_t *ctx,
newtd->td_proc = td->td_proc;
newtd->td_ucred = crhold(td->td_ucred);
- cpu_set_upcall(newtd, td);
-
if (ctx != NULL) { /* old way to set user context */
error = set_mcontext(newtd, ctx);
if (error != 0) {
OpenPOWER on IntegriCloud