~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/sh/include/asm/futex.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
/* XXX: UP variants, fix for SH-4A and SMP.. */
11
11
#include <asm/futex-irq.h>
12
12
 
13
 
static inline int futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
 
13
static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr)
14
14
{
15
15
        int op = (encoded_op >> 28) & 7;
16
16
        int cmp = (encoded_op >> 24) & 15;
21
21
        if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
22
22
                oparg = 1 << oparg;
23
23
 
24
 
        if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
 
24
        if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
25
25
                return -EFAULT;
26
26
 
27
27
        pagefault_disable();
65
65
}
66
66
 
67
67
static inline int
68
 
futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
 
68
futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
 
69
                              u32 oldval, u32 newval)
69
70
{
70
 
        if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
 
71
        if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32)))
71
72
                return -EFAULT;
72
73
 
73
 
        return atomic_futex_op_cmpxchg_inatomic(uaddr, oldval, newval);
 
74
        return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval);
74
75
}
75
76
 
76
77
#endif /* __KERNEL__ */