diff options
-rw-r--r-- | sys/alpha/alpha/sys_machdep.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/alpha/alpha/sys_machdep.c b/sys/alpha/alpha/sys_machdep.c index 47dae7b..0d9f5fe 100644 --- a/sys/alpha/alpha/sys_machdep.c +++ b/sys/alpha/alpha/sys_machdep.c @@ -170,6 +170,7 @@ alpha_set_uac(struct thread *td, char *args) int error; unsigned long uac; struct proc *p; + struct thread *td; error = copyin(args, &uac, sizeof(uac)); if (error) @@ -180,8 +181,9 @@ alpha_set_uac(struct thread *td, char *args) if (p->p_pptr) { PROC_LOCK(p->p_pptr); /* XXXKSE which threads? */ - FIRST_THREAD_IN_PROC(p->p_pptr)->td_md.md_flags &= ~MDP_UAC_MASK; - FIRST_THREAD_IN_PROC(p->p_pptr)->td_md.md_flags |= uac & MDP_UAC_MASK; + td = FIRST_THREAD_IN_PROC(p->p_pptr); + td->td_md.md_flags &= ~MDP_UAC_MASK; + td->td_md.md_flags |= uac & MDP_UAC_MASK; PROC_UNLOCK(p->p_pptr); } PROC_UNLOCK(p); @@ -192,6 +194,7 @@ static int alpha_get_uac(struct thread *td, char *args) { struct proc *p; + struct thread *td; int error; unsigned long uac; @@ -201,7 +204,8 @@ alpha_get_uac(struct thread *td, char *args) if (p->p_pptr) { PROC_LOCK(p->p_pptr); /* XXXKSE which threads? */ - uac = FIRST_THREAD_IN_PROC(p->p_pptr)->td_md.md_flags & MDP_UAC_MASK; + td = FIRST_THREAD_IN_PROC(p->p_pptr); + uac = td->td_md.md_flags & MDP_UAC_MASK; PROC_UNLOCK(p->p_pptr); PROC_UNLOCK(p); error = copyout(&uac, args, sizeof(uac)); |