| 139 | ATOMIC_ACQ_REL_LONG(add) |
| 140 | |
| 141 | static __inline void |
| 142 | atomic_clear_32(volatile uint32_t *address, uint32_t setmask) |
| 143 | { |
| 144 | uint32_t tmp = 0, tmp2 = 0; |
| 145 | |
| 146 | __asm __volatile( |
| 147 | "1: ldrex %0, [%2] \n" |
| 148 | " bic %0, %0, %3 \n" |
| 149 | " strex %1, %0, [%2] \n" |
| 150 | " cmp %1, #0 \n" |
| 151 | " it ne \n" |
| 152 | " bne 1b \n" |
| 153 | : "=&r" (tmp), "+r" (tmp2), "+r" (address), "+r" (setmask) |
| 154 | : : "cc", "memory"); |
| 155 | } |
| 156 | |
| 157 | static __inline void |
| 158 | atomic_clear_64(volatile uint64_t *p, uint64_t val) |