From 59e8ad5a4cd503ce5e0ec12e11609971683ab5cc Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 24 Oct 2002 23:09:48 +0000 Subject: Extract out KSE specific code from machine specific code so that there is ony one copy of it. Fix that one copy so that KSEs with no mailbox in a KSE program are not a cause of page faults (this can legitmatly happen). Submitted by: (parts) davidxu --- sys/alpha/alpha/trap.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'sys/alpha') diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index 3db80de..6c554f7 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -669,24 +669,8 @@ syscall(code, framep) sticks = td->td_kse->ke_sticks; if (td->td_ucred != p->p_ucred) cred_update_thread(td); - if (p->p_flag & P_KSES) { - /* - * If we are doing a syscall in a KSE environment, - * note where our mailbox is. There is always the - * possibility that we could do this lazily (in sleep()), - * but for now do it every time. - */ - td->td_mailbox = (void *)fuword((caddr_t)td->td_kse->ke_mailbox - + offsetof(struct kse_mailbox, km_curthread)); - if ((td->td_mailbox == NULL) || - (td->td_mailbox == (void *)-1)) { - td->td_mailbox = NULL; /* single thread it.. */ - td->td_flags &= ~TDF_UNBOUND; - } else { - td->td_flags |= TDF_UNBOUND; - } - } - + if (p->p_flag & P_KSES) + thread_user_enter(p, td); #ifdef DIAGNOSTIC alpha_fpstate_check(td); #endif -- cgit v1.1