diff options
author | julian <julian@FreeBSD.org> | 2004-08-31 07:34:54 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-08-31 07:34:54 +0000 |
commit | 2782d4b3fc93d70e6b2e643c22ad90982b863bf1 (patch) | |
tree | 1a975f2ac0a0702045b32ec5bdafabf3aa115857 /sys/kern | |
parent | ee753ed190029f2bb1071fa1905073ad15121ae5 (diff) | |
download | FreeBSD-src-2782d4b3fc93d70e6b2e643c22ad90982b863bf1.zip FreeBSD-src-2782d4b3fc93d70e6b2e643c22ad90982b863bf1.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_kse.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_trap.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 4b8a2c2..02ef46d 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -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); diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 4cd09cc..4ecbd03 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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); diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index ccdaa2d..3f68103 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -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. |