DragonFly-2.3.2.54.gab6109 master sys/cpu/amd64/include atomic.h sys/cpu/i386/include atomic.h

Matthew Dillon dillon at crater.dragonflybsd.org
Wed Jul 15 11:40:28 PDT 2009


commit ab6109fbf5fccc452927e19ab4ed5ad0f62e4a38
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Wed Jul 15 09:44:22 2009 -0700

    Adjust atomic_cmpset_int/long - Faster version, fix amd64 issue.
    
    * Instead of using the condition code just compare %eax (or %rax)
      against the old value.  This is considerably faster then using
      sete/movzbl and GCC will also optimize the caller's test for
      both 0 or non-zero.
    
    * AMD64.  long is 64 bits, use cmpxchgq (it was previously using cmpxchgl).

Summary of changes:
 sys/cpu/amd64/include/atomic.h |   15 +++++++++------
 sys/cpu/i386/include/atomic.h  |    4 +---
 2 files changed, 10 insertions(+), 9 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ab6109fbf5fccc452927e19ab4ed5ad0f62e4a38


-- 
DragonFly BSD source repository





More information about the Commits mailing list