Bah, I managed to turn cosmetic things into real bugs. Fix shadowed

variable declarations. :-(  Definately not my day today.
This commit is contained in:
peter 2002-02-08 08:56:01 +00:00
parent 2a6db49cc9
commit 3589cfc992
3 changed files with 22 additions and 22 deletions

View File

@ -170,7 +170,7 @@ alpha_set_uac(struct thread *td, char *args)
int error; int error;
unsigned long uac; unsigned long uac;
struct proc *p; struct proc *p;
struct thread *td; struct thread *td2;
error = copyin(args, &uac, sizeof(uac)); error = copyin(args, &uac, sizeof(uac));
if (error) if (error)
@ -181,9 +181,9 @@ alpha_set_uac(struct thread *td, char *args)
if (p->p_pptr) { if (p->p_pptr) {
PROC_LOCK(p->p_pptr); PROC_LOCK(p->p_pptr);
/* XXXKSE which threads? */ /* XXXKSE which threads? */
td = FIRST_THREAD_IN_PROC(p->p_pptr); td2 = FIRST_THREAD_IN_PROC(p->p_pptr);
td->td_md.md_flags &= ~MDP_UAC_MASK; td2->td_md.md_flags &= ~MDP_UAC_MASK;
td->td_md.md_flags |= uac & MDP_UAC_MASK; td2->td_md.md_flags |= uac & MDP_UAC_MASK;
PROC_UNLOCK(p->p_pptr); PROC_UNLOCK(p->p_pptr);
} }
PROC_UNLOCK(p); PROC_UNLOCK(p);
@ -194,7 +194,7 @@ static int
alpha_get_uac(struct thread *td, char *args) alpha_get_uac(struct thread *td, char *args)
{ {
struct proc *p; struct proc *p;
struct thread *td; struct thread *td2;
int error; int error;
unsigned long uac; unsigned long uac;
@ -204,8 +204,8 @@ alpha_get_uac(struct thread *td, char *args)
if (p->p_pptr) { if (p->p_pptr) {
PROC_LOCK(p->p_pptr); PROC_LOCK(p->p_pptr);
/* XXXKSE which threads? */ /* XXXKSE which threads? */
td = FIRST_THREAD_IN_PROC(p->p_pptr); td2 = FIRST_THREAD_IN_PROC(p->p_pptr);
uac = td->td_md.md_flags & MDP_UAC_MASK; uac = td2->td_md.md_flags & MDP_UAC_MASK;
PROC_UNLOCK(p->p_pptr); PROC_UNLOCK(p->p_pptr);
PROC_UNLOCK(p); PROC_UNLOCK(p);
error = copyout(&uac, args, sizeof(uac)); error = copyout(&uac, args, sizeof(uac));

View File

@ -127,7 +127,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
{ {
int error, ff = RFPROC | RFSTOPPED; int error, ff = RFPROC | RFSTOPPED;
struct proc *p2; struct proc *p2;
struct thread *td; struct thread *td2;
int exit_signal; int exit_signal;
vm_offset_t start; vm_offset_t start;
@ -167,8 +167,8 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
PROC_LOCK(p2); PROC_LOCK(p2);
p2->p_sigparent = exit_signal; p2->p_sigparent = exit_signal;
PROC_UNLOCK(p2); PROC_UNLOCK(p2);
td = FIRST_THREAD_IN_PROC(p2); td2 = FIRST_THREAD_IN_PROC(p2);
td->td_pcb->pcb_hw.apcb_usp = (unsigned long)args->stack; td2->td_pcb->pcb_hw.apcb_usp = (unsigned long)args->stack;
#ifdef DEBUG #ifdef DEBUG
if (ldebug(clone)) if (ldebug(clone))

View File

@ -263,7 +263,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
{ {
struct proc *curp = td->td_proc; struct proc *curp = td->td_proc;
struct proc *p; struct proc *p;
struct thread *td; struct thread *td2;
struct iovec iov; struct iovec iov;
struct uio uio; struct uio uio;
union { union {
@ -379,13 +379,13 @@ ptrace(struct thread *td, struct ptrace_args *uap)
return (EINVAL); return (EINVAL);
} }
td = FIRST_THREAD_IN_PROC(p); td2 = FIRST_THREAD_IN_PROC(p);
PROC_UNLOCK(p); PROC_UNLOCK(p);
#ifdef FIX_SSTEP #ifdef FIX_SSTEP
/* /*
* Single step fixup ala procfs * Single step fixup ala procfs
*/ */
FIX_SSTEP(td); /* XXXKSE */ FIX_SSTEP(td2); /* XXXKSE */
#endif #endif
/* /*
@ -427,7 +427,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
PHOLD(p); PHOLD(p);
if (uap->req == PT_STEP) { if (uap->req == PT_STEP) {
error = ptrace_single_step(td); error = ptrace_single_step(td2);
if (error) { if (error) {
PRELE(p); PRELE(p);
return (error); return (error);
@ -436,7 +436,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
if (uap->addr != (caddr_t)1) { if (uap->addr != (caddr_t)1) {
fill_kinfo_proc(p, &p->p_uarea->u_kproc); fill_kinfo_proc(p, &p->p_uarea->u_kproc);
error = ptrace_set_pc(td, error = ptrace_set_pc(td2,
(u_long)(uintfptr_t)uap->addr); (u_long)(uintfptr_t)uap->addr);
if (error) { if (error) {
PRELE(p); PRELE(p);
@ -476,7 +476,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
mtx_lock_spin(&sched_lock); mtx_lock_spin(&sched_lock);
if (p->p_stat == SSTOP) { if (p->p_stat == SSTOP) {
p->p_xstat = uap->data; p->p_xstat = uap->data;
setrunnable(td); /* XXXKSE */ setrunnable(td2); /* XXXKSE */
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
} else { } else {
mtx_unlock_spin(&sched_lock); mtx_unlock_spin(&sched_lock);
@ -529,7 +529,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
error = copyin(uap->addr, &r.reg, sizeof r.reg); error = copyin(uap->addr, &r.reg, sizeof r.reg);
if (error == 0) { if (error == 0) {
PHOLD(p); PHOLD(p);
error = proc_write_regs(td, &r.reg); error = proc_write_regs(td2, &r.reg);
PRELE(p); PRELE(p);
} }
return (error); return (error);
@ -538,7 +538,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
#ifdef PT_GETREGS #ifdef PT_GETREGS
case PT_GETREGS: case PT_GETREGS:
PHOLD(p); PHOLD(p);
error = proc_read_regs(td, &r.reg); error = proc_read_regs(td2, &r.reg);
PRELE(p); PRELE(p);
if (error == 0) if (error == 0)
error = copyout(&r.reg, uap->addr, sizeof r.reg); error = copyout(&r.reg, uap->addr, sizeof r.reg);
@ -550,7 +550,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
error = copyin(uap->addr, &r.fpreg, sizeof r.fpreg); error = copyin(uap->addr, &r.fpreg, sizeof r.fpreg);
if (error == 0) { if (error == 0) {
PHOLD(p); PHOLD(p);
error = proc_write_fpregs(td, &r.fpreg); error = proc_write_fpregs(td2, &r.fpreg);
PRELE(p); PRELE(p);
} }
return (error); return (error);
@ -559,7 +559,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
#ifdef PT_GETFPREGS #ifdef PT_GETFPREGS
case PT_GETFPREGS: case PT_GETFPREGS:
PHOLD(p); PHOLD(p);
error = proc_read_fpregs(td, &r.fpreg); error = proc_read_fpregs(td2, &r.fpreg);
PRELE(p); PRELE(p);
if (error == 0) if (error == 0)
error = copyout(&r.fpreg, uap->addr, sizeof r.fpreg); error = copyout(&r.fpreg, uap->addr, sizeof r.fpreg);
@ -571,7 +571,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
error = copyin(uap->addr, &r.dbreg, sizeof r.dbreg); error = copyin(uap->addr, &r.dbreg, sizeof r.dbreg);
if (error == 0) { if (error == 0) {
PHOLD(p); PHOLD(p);
error = proc_write_dbregs(td, &r.dbreg); error = proc_write_dbregs(td2, &r.dbreg);
PRELE(p); PRELE(p);
} }
return (error); return (error);
@ -580,7 +580,7 @@ ptrace(struct thread *td, struct ptrace_args *uap)
#ifdef PT_GETDBREGS #ifdef PT_GETDBREGS
case PT_GETDBREGS: case PT_GETDBREGS:
PHOLD(p); PHOLD(p);
error = proc_read_dbregs(td, &r.dbreg); error = proc_read_dbregs(td2, &r.dbreg);
PRELE(p); PRELE(p);
if (error == 0) if (error == 0)
error = copyout(&r.dbreg, uap->addr, sizeof r.dbreg); error = copyout(&r.dbreg, uap->addr, sizeof r.dbreg);