1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_FUTEX_IRQ_H
3 #define __ASM_SH_FUTEX_IRQ_H
5 static inline int atomic_futex_op_cmpxchg_inatomic(u32
*uval
,
7 u32 oldval
, u32 newval
)
13 local_irq_save(flags
);
15 ret
= get_user(prev
, uaddr
);
16 if (!ret
&& oldval
== prev
)
17 ret
= put_user(newval
, uaddr
);
19 local_irq_restore(flags
);
25 #endif /* __ASM_SH_FUTEX_IRQ_H */