Atomic operations on i386/amd64

From: Tim Robbins <tjr_at_freebsd.org>
Date: Thu, 5 Aug 2004 15:04:22 +1000
Is there any particular reason why atomic_load_acq_*() and
atomic_store_rel_*() are implemented with CMPXCHG and XCHG instead of
MOV on i386/amd64 UP?

Also, could we use MFENCE/LFENCE/SFENCE in combination with MOV on
SMP systems instead of LOCK CMPXCHG / (implied LOCK) XCHG?


Tim
Received on Thu Aug 05 2004 - 03:04:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:04 UTC