diff options
author | julian <julian@FreeBSD.org> | 2002-10-24 23:09:48 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2002-10-24 23:09:48 +0000 |
commit | 59e8ad5a4cd503ce5e0ec12e11609971683ab5cc (patch) | |
tree | 62423a3307545934139e299f4e19177031d11875 /sys/alpha | |
parent | f1e4ff6b707f91cd9b24d6adef67a812a71a736c (diff) | |
download | FreeBSD-src-59e8ad5a4cd503ce5e0ec12e11609971683ab5cc.zip FreeBSD-src-59e8ad5a4cd503ce5e0ec12e11609971683ab5cc.tar.gz |
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
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/trap.c | 20 |
1 files changed, 2 insertions, 18 deletions
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 |