Remove an unneeded argument..

The removed argument could trivially be derived from the remaining one.
That in turn should be the same as curthread, but it is possible that curthread could be expensive to derive on some syste,s so leave it as an argument.
Having both proc and thread as an argumen tjust gives an opportunity for
them to get out sync.

MFC after:	3 days
This commit is contained in:
Julian Elischer 2004-08-31 07:34:54 +00:00
parent 99e9dcb817
commit 5995adc206
11 changed files with 14 additions and 14 deletions

View File

@ -662,7 +662,7 @@ syscall(code, framep)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
#ifdef DIAGNOSTIC
alpha_fpstate_check(td);
#endif

View File

@ -259,7 +259,7 @@ trap(frame)
case T_PAGEFLT: /* page fault */
if (td->td_pflags & TDP_SA)
thread_user_enter(p, td);
thread_user_enter(td);
i = trap_pfault(&frame, TRUE);
if (i == -1)
goto userout;
@ -695,7 +695,7 @@ syscall(frame)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
params = (caddr_t)frame.tf_rsp + sizeof(register_t);
code = frame.tf_rax;
orig_tf_rflags = frame.tf_rflags;

View File

@ -311,7 +311,7 @@ trap(frame)
case T_PAGEFLT: /* page fault */
if (td->td_pflags & TDP_SA)
thread_user_enter(p, td);
thread_user_enter(td);
i = trap_pfault(&frame, TRUE, eva);
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
@ -925,7 +925,7 @@ syscall(frame)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
params = (caddr_t)frame.tf_esp + sizeof(int);
code = frame.tf_eax;
orig_tf_eflags = frame.tf_eflags;

View File

@ -983,7 +983,7 @@ syscall(struct trapframe *tf)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
if (p->p_sysent->sv_prepsyscall) {
/* (*p->p_sysent->sv_prepsyscall)(tf, args, &code, &params); */

View File

@ -1144,7 +1144,7 @@ thread_switchout(struct thread *td)
* Setup done on the thread when it enters the kernel.
*/
void
thread_user_enter(struct proc *p, struct thread *td)
thread_user_enter(struct thread *td)
{
struct ksegrp *kg;
struct kse_upcall *ku;
@ -1187,7 +1187,7 @@ thread_user_enter(struct proc *p, struct thread *td)
} else {
td->td_mailbox = tmbx;
td->td_pflags |= TDP_CAN_UNBIND;
if (__predict_false(p->p_flag & P_TRACED)) {
if (__predict_false(td->td_proc->p_flag & P_TRACED)) {
flags = fuword32(&tmbx->tm_dflags);
if (flags & TMDF_SUSPEND) {
mtx_lock_spin(&sched_lock);

View File

@ -1487,7 +1487,7 @@ trapsignal(struct thread *td, int sig, u_long code)
p = td->td_proc;
if (td->td_pflags & TDP_SA) {
if (td->td_mailbox == NULL)
thread_user_enter(p, td);
thread_user_enter(td);
PROC_LOCK(p);
SIGDELSET(td->td_sigmask, sig);
mtx_lock_spin(&sched_lock);

View File

@ -163,7 +163,7 @@ ast(struct trapframe *framep)
td->td_frame = framep;
if ((p->p_flag & P_SA) && (td->td_mailbox == NULL))
thread_user_enter(p, td);
thread_user_enter(td);
/*
* This updates the p_sflag's for the checks below in one
* "atomic" operation with turning off the astpending flag.

View File

@ -341,7 +341,7 @@ syscall(struct trapframe *frame)
atomic_add_int(&cnt.v_syscall, 1);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
code = frame->fixreg[0];
params = (caddr_t)(frame->fixreg + FIRSTARG);

View File

@ -341,7 +341,7 @@ syscall(struct trapframe *frame)
atomic_add_int(&cnt.v_syscall, 1);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
code = frame->fixreg[0];
params = (caddr_t)(frame->fixreg + FIRSTARG);

View File

@ -523,7 +523,7 @@ syscall(struct trapframe *tf)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if (p->p_flag & P_SA)
thread_user_enter(p, td);
thread_user_enter(td);
code = tf->tf_global[1];
/*

View File

@ -961,7 +961,7 @@ void thread_unsuspend(struct proc *p);
void thread_unsuspend_one(struct thread *td);
int thread_userret(struct thread *td, struct trapframe *frame);
int thread_upcall_check(struct thread *td);
void thread_user_enter(struct proc *p, struct thread *td);
void thread_user_enter(struct thread *td);
void thread_wait(struct proc *p);
int thread_statclock(int user);
struct kse_upcall *upcall_alloc(void);