Show
Ignore:
Timestamp:
08/24/10 14:43:46 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1282661026 +0000
git-parent:

[4500f930aaa30b26a9f50b47170fdb6683281754]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1282661026 +0000
Message:

this should be better, refs #305

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/utils/noit_atomic.h

    ra972c1d rcd3d910  
    8484                  volatile noit_atomic64_t curr) { 
    8585  noit_atomic64_t prev; 
     86#ifdef __PIC__ 
    8687  __asm__ volatile ( 
    8788      "pushl %%ebx;" 
     
    9495    : "m" (rpl), "A" (curr), "r" (ptr) 
    9596    : "%ecx", "memory", "cc"); 
     97#else 
     98  __asm__ volatile ( 
     99      "lock;" 
     100      "cmpxchg8b (%3);" 
     101    : "=A" (prev) 
     102    : "m" (rpl), "A" (curr), "r" (ptr) 
     103    : "memory", "cc"); 
     104#endif 
    96105  return prev; 
    97106};