12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include "pt-machine.h"
- long int testandset (int *spinlock)
- {
- int ret;
- __asm__ __volatile__(
- "tas.b @%1\n\t"
- "movt %0"
- : "=r" (ret)
- : "r" (spinlock)
- : "memory", "cc");
- return (ret == 0);
- }
|