aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/futex-irq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sh/futex-irq.h')
-rw-r--r--include/asm-sh/futex-irq.h111
1 files changed, 0 insertions, 111 deletions
diff --git a/include/asm-sh/futex-irq.h b/include/asm-sh/futex-irq.h
deleted file mode 100644
index a9f16a7..0000000
--- a/include/asm-sh/futex-irq.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef __ASM_SH_FUTEX_IRQ_H
-#define __ASM_SH_FUTEX_IRQ_H
-
-#include <asm/system.h>
-
-static inline int atomic_futex_op_xchg_set(int oparg, int __user *uaddr,
- int *oldval)
-{
- unsigned long flags;
- int ret;
-
- local_irq_save(flags);
-
- ret = get_user(*oldval, uaddr);
- if (!ret)
- ret = put_user(oparg, uaddr);
-
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline int atomic_futex_op_xchg_add(int oparg, int __user *uaddr,
- int *oldval)
-{
- unsigned long flags;
- int ret;
-
- local_irq_save(flags);
-
- ret = get_user(*oldval, uaddr);
- if (!ret)
- ret = put_user(*oldval + oparg, uaddr);
-
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline int atomic_futex_op_xchg_or(int oparg, int __user *uaddr,
- int *oldval)
-{
- unsigned long flags;
- int ret;
-
- local_irq_save(flags);
-
- ret = get_user(*oldval, uaddr);
- if (!ret)
- ret = put_user(*oldval | oparg, uaddr);
-
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline int atomic_futex_op_xchg_and(int oparg, int __user *uaddr,
- int *oldval)
-{
- unsigned long flags;
- int ret;
-
- local_irq_save(flags);
-
- ret = get_user(*oldval, uaddr);
- if (!ret)
- ret = put_user(*oldval & oparg, uaddr);
-
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline int atomic_futex_op_xchg_xor(int oparg, int __user *uaddr,
- int *oldval)
-{
- unsigned long flags;
- int ret;
-
- local_irq_save(flags);
-
- ret = get_user(*oldval, uaddr);
- if (!ret)
- ret = put_user(*oldval ^ oparg, uaddr);
-
- local_irq_restore(flags);
-
- return ret;
-}
-
-static inline int atomic_futex_op_cmpxchg_inatomic(int __user *uaddr,
- int oldval, int newval)
-{
- unsigned long flags;
- int ret, prev = 0;
-
- local_irq_save(flags);
-
- ret = get_user(prev, uaddr);
- if (!ret && oldval == prev)
- ret = put_user(newval, uaddr);
-
- local_irq_restore(flags);
-
- if (ret)
- return ret;
-
- return prev;
-}
-
-#endif /* __ASM_SH_FUTEX_IRQ_H */