Adjust atomic_cmpset_int/long - Faster version, fix amd64 issue.
authorMatthew Dillon <dillon@apollo.backplane.com>
Wed, 15 Jul 2009 16:44:22 +0000 (09:44 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Wed, 15 Jul 2009 16:44:22 +0000 (09:44 -0700)
commitab6109fbf5fccc452927e19ab4ed5ad0f62e4a38
treec4303e1874c25d82cce0549268000c7cf9a41793
parent10fe29c0a089050047dce11d93ef6590c28cb176
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).
sys/cpu/amd64/include/atomic.h
sys/cpu/i386/include/atomic.h