__sync_lock_test_and_set on ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Experts,

I believe that ARM's swap instruction can be used to implement the __sync_lock_test_and_set builtin, yet as far as I can see it is not implemented. Can anyone please confirm if (a) it is implemented but I'm doing something wrong, or (b) there's some reason why it can't be done? FWIW here is some asm that I am currently using for this:

    asm volatile ("swp\t%0, %1, [%2]"
                 :"=r" (oldval)
                 :"r"  (newval),
                  "r"  (&mem)
                 :"memory");


Regards,

Phil.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux