diff --git a/[refs] b/[refs] index cf85f07e44ae..5a821a975e17 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 29f742f88a32c9ab8cf6d9ba69e1ea918be5aa58 +refs/heads/master: 55c2945aa9d4d907ec5ca4f6a4e30ae908d8d30d diff --git a/trunk/include/linux/atomic.h b/trunk/include/linux/atomic.h index 96c038e43d66..ee456c79b0e6 100644 --- a/trunk/include/linux/atomic.h +++ b/trunk/include/linux/atomic.h @@ -34,4 +34,17 @@ static inline int atomic_inc_not_zero_hint(atomic_t *v, int hint) } #endif +#ifndef CONFIG_ARCH_HAS_ATOMIC_OR +static inline void atomic_or(int i, atomic_t *v) +{ + int old; + int new; + + do { + old = atomic_read(v); + new = old | i; + } while (atomic_cmpxchg(v, old, new) != old); +} +#endif /* #ifndef CONFIG_ARCH_HAS_ATOMIC_OR */ + #endif /* _LINUX_ATOMIC_H */