| 205 | } |
| 206 | |
| 207 | static __inline void |
| 208 | atomic_clear_64(__volatile uint64_t *p, uint64_t v) |
| 209 | { |
| 210 | uint64_t temp; |
| 211 | v = ~v; |
| 212 | |
| 213 | __asm __volatile ( |
| 214 | "1:\n\t" |
| 215 | "lld %0, %3\n\t" /* load old value */ |
| 216 | "and %0, %2, %0\n\t" /* calculate new value */ |
| 217 | "scd %0, %1\n\t" /* attempt to store */ |
| 218 | "beqz %0, 1b\n\t" /* spin if failed */ |
| 219 | : "=&r" (temp), "=m" (*p) |
| 220 | : "r" (v), "m" (*p) |
| 221 | : "memory"); |
| 222 | } |
| 223 | |
| 224 | static __inline void |
| 225 | atomic_add_64(__volatile uint64_t *p, uint64_t v) |
no outgoing calls
no test coverage detected