diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-10-17 02:24:47 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-10-17 02:24:47 +0000 |
commit | bb5a3880aaba619ef92556240b090b17a430f444 (patch) | |
tree | b31b5290e903f0eb1069077900871403a7ca78f8 /sys/powerpc | |
parent | c0e6d5e6651f1b6140e24533f47bd20e2ca2952d (diff) | |
download | FreeBSD-src-bb5a3880aaba619ef92556240b090b17a430f444.zip FreeBSD-src-bb5a3880aaba619ef92556240b090b17a430f444.tar.gz |
o Add keyword volatile for user mutex owner field.
o Fix type consistent problem by using type long for old
umtx and wait channel.
o Rename casuptr to casuword.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/aim/copyinout.c | 14 | ||||
-rw-r--r-- | sys/powerpc/powerpc/copyinout.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/sys/powerpc/aim/copyinout.c b/sys/powerpc/aim/copyinout.c index 4c19cbf..a5683eb 100644 --- a/sys/powerpc/aim/copyinout.c +++ b/sys/powerpc/aim/copyinout.c @@ -322,23 +322,23 @@ fuword32(const void *addr) return ((int32_t)fuword(addr)); } -int32_t -casuword32(int32_t *base, int32_t oldval, int32_t newval) +uint32_t +casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval) { - return (casuptr(base, oldval, newval)); + return (casuword(base, oldval, newval)); } -intptr_t -casuptr(intptr_t *addr, intptr_t old, intptr_t new) +u_long +casuword(volatile u_long *addr, u_long old, u_long new) { struct thread *td; pmap_t pm; faultbuf env; - intptr_t *p, val; + u_long *p, val; td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (intptr_t *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); diff --git a/sys/powerpc/powerpc/copyinout.c b/sys/powerpc/powerpc/copyinout.c index 4c19cbf..a5683eb 100644 --- a/sys/powerpc/powerpc/copyinout.c +++ b/sys/powerpc/powerpc/copyinout.c @@ -322,23 +322,23 @@ fuword32(const void *addr) return ((int32_t)fuword(addr)); } -int32_t -casuword32(int32_t *base, int32_t oldval, int32_t newval) +uint32_t +casuword32(volatile uint32_t *base, uint32_t oldval, uint32_t newval) { - return (casuptr(base, oldval, newval)); + return (casuword(base, oldval, newval)); } -intptr_t -casuptr(intptr_t *addr, intptr_t old, intptr_t new) +u_long +casuword(volatile u_long *addr, u_long old, u_long new) { struct thread *td; pmap_t pm; faultbuf env; - intptr_t *p, val; + u_long *p, val; td = PCPU_GET(curthread); pm = &td->td_proc->p_vmspace->vm_pmap; - p = (intptr_t *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); + p = (u_long *)((u_int)USER_ADDR + ((u_int)addr & ~SEGMENT_MASK)); set_user_sr(pm->pm_sr[(u_int)addr >> ADDR_SR_SHFT]); |