ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/sysdeps.h
(Generate patch)

Comparing SheepShaver/src/Unix/sysdeps.h (file contents):
Revision 1.30 by gbeauche, 2004-05-20T12:33:57Z vs.
Revision 1.31 by gbeauche, 2004-05-20T17:46:49Z

# Line 249 | Line 249 | static inline int testandset(volatile in
249   }
250   #endif
251  
252 < #ifdef __i386__
252 > #if defined(__i386__) || defined(__x86_64__)
253   #define HAVE_TEST_AND_SET 1
254   static inline int testandset(volatile int *p)
255   {
256 <        int ret;
257 <        long int readval;
256 >        long int ret;
257          /* Note: the "xchg" instruction does not need a "lock" prefix */
258 <        __asm__ __volatile__("xchgl %0, %1"
259 <                                                 : "=r" (ret), "=m" (*p), "=a" (readval)
258 >        __asm__ __volatile__("xchgl %k0, %1"
259 >                                                 : "=r" (ret), "=m" (*p)
260                                                   : "0" (1), "m" (*p)
261                                                   : "memory");
262          return ret;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines