Rev 6082 | Rev 6659 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6082 | Rev 6588 | ||
---|---|---|---|
Line 310... | Line 310... | ||
310 | } |
310 | } |
Line 311... | Line 311... | ||
311 | 311 | ||
312 | #undef alternative_atomic64 |
312 | #undef alternative_atomic64 |
Line -... | Line 313... | ||
- | 313 | #undef __alternative_atomic64 |
|
- | 314 | ||
- | 315 | #define ATOMIC64_OP(op, c_op) \ |
|
- | 316 | static inline void atomic64_##op(long long i, atomic64_t *v) \ |
|
- | 317 | { \ |
|
- | 318 | long long old, c = 0; \ |
|
- | 319 | while ((old = atomic64_cmpxchg(v, c, c c_op i)) != c) \ |
|
- | 320 | c = old; \ |
|
- | 321 | } |
|
- | 322 | ||
- | 323 | ATOMIC64_OP(and, &) |
|
- | 324 | ATOMIC64_OP(or, |) |
|
- | 325 | ATOMIC64_OP(xor, ^) |
|
- | 326 | ||
313 | #undef __alternative_atomic64 |
327 | #undef ATOMIC64_OP |