| 761 | ATOMIC_ACQ_REL_LONG(set) |
| 762 | |
| 763 | static __inline void |
| 764 | atomic_subtract_32(volatile uint32_t *p, uint32_t val) |
| 765 | { |
| 766 | uint32_t tmp = 0, tmp2 = 0; |
| 767 | |
| 768 | __asm __volatile( |
| 769 | "1: ldrex %0, [%2] \n" |
| 770 | " sub %0, %0, %3 \n" |
| 771 | " strex %1, %0, [%2] \n" |
| 772 | " cmp %1, #0 \n" |
| 773 | " it ne \n" |
| 774 | " bne 1b \n" |
| 775 | : "=&r" (tmp), "+r" (tmp2), "+r" (p), "+r" (val) |
| 776 | : : "cc", "memory"); |
| 777 | } |
| 778 | |
| 779 | static __inline void |
| 780 | atomic_subtract_64(volatile uint64_t *p, uint64_t val) |
no outgoing calls
no test coverage detected