Revision bc51c5c9 exec-all.h

b/exec-all.h
400 400
}
401 401
#endif
402 402

  
403
#ifdef __x86_64__
404
static inline int testandset (int *p)
405
{
406
    char ret;
407
    int readval;
408
    
409
    __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
410
                          : "=q" (ret), "=m" (*p), "=a" (readval)
411
                          : "r" (1), "m" (*p), "a" (0)
412
                          : "memory");
413
    return ret;
414
}
415
#endif
416

  
403 417
#ifdef __s390__
404 418
static inline int testandset (int *p)
405 419
{

Also available in: Unified diff