summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kse.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_kse.c')
-rw-r--r--sys/kern/kern_kse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index a420701..4b8a2c2 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -970,9 +970,11 @@ thread_update_usr_ticks(struct thread *td, int user)
if ((ku = td->td_upcall) == NULL)
return (-1);
- tmbx = (void *)fuword((void *)&ku->ku_mailbox->km_curthread);
- if ((tmbx == NULL) || (tmbx == (void *)-1))
- return (-1);
+ if ((tmbx = td->td_mailbox) == NULL) {
+ tmbx = (void *)fuword((void *)&ku->ku_mailbox->km_curthread);
+ if ((tmbx == NULL) || (tmbx == (void *)-1))
+ return (-1);
+ }
if (user) {
uticks = td->td_uuticks;
td->td_uuticks = 0;
@@ -1280,7 +1282,7 @@ thread_userret(struct thread *td, struct trapframe *frame)
/* NOTREACHED */
}
- KASSERT(ku != NULL, ("upcall is NULL\n"));
+ KASSERT(ku != NULL, ("upcall is NULL"));
KASSERT(TD_CAN_UNBIND(td) == 0, ("can unbind"));
if (p->p_numthreads > max_threads_per_proc) {
OpenPOWER on IntegriCloud