From a6ba8197504f655d03cdfd61b3a036d6c41bdd55 Mon Sep 17 00:00:00 2001 From: davidxu Date: Sat, 28 Aug 2004 04:16:32 +0000 Subject: 1. try to use existing mailbox address in thread_update_usr_ticks. 2. remove '\n' in KASSERT. --- sys/kern/kern_kse.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/kern') 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) { -- cgit v1.1