1. try to use existing mailbox address in thread_update_usr_ticks.

2. remove '\n' in KASSERT.
This commit is contained in:
davidxu 2004-08-28 04:16:32 +00:00
parent 96f0feb1d4
commit a6ba819750

View File

@ -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) {