| 90 | } |
| 91 | |
| 92 | static __inline void |
| 93 | atomic_add_32(volatile uint32_t *p, uint32_t val) |
| 94 | { |
| 95 | uint32_t tmp = 0, tmp2 = 0; |
| 96 | |
| 97 | __asm __volatile( |
| 98 | "1: ldrex %0, [%2] \n" |
| 99 | " add %0, %0, %3 \n" |
| 100 | " strex %1, %0, [%2] \n" |
| 101 | " cmp %1, #0 \n" |
| 102 | " it ne \n" |
| 103 | " bne 1b \n" |
| 104 | : "=&r" (tmp), "+r" (tmp2) |
| 105 | ,"+r" (p), "+r" (val) : : "cc", "memory"); |
| 106 | } |
| 107 | |
| 108 | static __inline void |
| 109 | atomic_add_64(volatile uint64_t *p, uint64_t val) |
no outgoing calls
no test coverage detected