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:
parent
99e9dcb817
commit
5995adc206
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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, ¶ms); */
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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];
|
||||
|
||||
/*
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user