OK, semi-big-hammer to enforce full memory fence on ia64 for test_and_set_bit test_and_clear_bit test_and_change_bit It's sad we don't have something like: test_and_set_bit_used_like_a_lock test_and_set_bit_used_like_an_unlock test_and_set_bit_full_memory_fence test_and_clear_bit_used_like_a_lock test_and_clear_bit_used_like_an_unlock test_and_clear_bit_full_memory_fence test_and_change_bit_used_like_a_lock test_and_change_bit_used_like_an_unlock test_and_change_bit_full_memory_fence - Ken Signed-off-by: Ken Chen <kenneth.w.chen@intel.com> --- ./include/asm-ia64/bitops.h.orig 2006-03-28 17:30:33.000000000 -0800 +++ ./include/asm-ia64/bitops.h 2006-03-28 17:31:30.000000000 -0800 @@ -166,7 +166,7 @@ test_and_set_bit (int nr, volatile void CMPXCHG_BUGCHECK(m); old = *m; new = old | bit; - } while (cmpxchg_acq(m, old, new) != old); + } while (cmpxchg_rel(m, old, new) != old); return (old & bit) != 0; } @@ -211,7 +211,7 @@ test_and_clear_bit (int nr, volatile voi CMPXCHG_BUGCHECK(m); old = *m; new = old & mask; - } while (cmpxchg_acq(m, old, new) != old); + } while (cmpxchg_rel(m, old, new) != old); return (old & ~mask) != 0; } @@ -256,7 +256,7 @@ test_and_change_bit (int nr, volatile vo CMPXCHG_BUGCHECK(m); old = *m; new = old ^ bit; - } while (cmpxchg_acq(m, old, new) != old); + } while (cmpxchg_rel(m, old, new) != old); return (old & bit) != 0; } - To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Wed Mar 29 12:26:02 2006
This archive was generated by hypermail 2.1.8 : 2006-03-29 12:26:16 EST