Add change to teh PPC to keep it in step with i386 and MI code

Pointy hat this direction please...
This commit is contained in:
Julian Elischer 2002-02-19 03:27:08 +00:00
parent 5b8c0a2993
commit bc08443ef1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=90895
2 changed files with 8 additions and 6 deletions

View File

@ -227,9 +227,8 @@ trap(struct trapframe *frame)
sticks = td->td_kse->ke_sticks;
td->td_frame = frame;
KASSERT(td->td_ucred == NULL, ("already have a ucred"));
PROC_LOCK(p);
td->td_ucred = crhold(p->p_ucred);
PROC_UNLOCK(p);
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
/* User Mode Traps */
switch (type) {
@ -297,10 +296,12 @@ trap(struct trapframe *frame)
}
userret(td, frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
#ifdef INVARIANTS
mtx_lock(&Giant);
crfree(td->td_ucred);
mtx_unlock(&Giant);
td->td_ucred = NULL;
#endif
}
void

View File

@ -227,9 +227,8 @@ trap(struct trapframe *frame)
sticks = td->td_kse->ke_sticks;
td->td_frame = frame;
KASSERT(td->td_ucred == NULL, ("already have a ucred"));
PROC_LOCK(p);
td->td_ucred = crhold(p->p_ucred);
PROC_UNLOCK(p);
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
/* User Mode Traps */
switch (type) {
@ -297,10 +296,12 @@ trap(struct trapframe *frame)
}
userret(td, frame, sticks);
mtx_assert(&Giant, MA_NOTOWNED);
#ifdef INVARIANTS
mtx_lock(&Giant);
crfree(td->td_ucred);
mtx_unlock(&Giant);
td->td_ucred = NULL;
#endif
}
void