MCPcopy Create free account
hub / github.com/F-Stack/f-stack / atomic_add_32

Function atomic_add_32

freebsd/arm/include/atomic-v6.h:92–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92static __inline void
93atomic_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
108static __inline void
109atomic_add_64(volatile uint64_t *p, uint64_t val)

Callers 8

atomic_add_longFunction · 0.70
get_cyclecountFunction · 0.70
ti_pruss_irq_readFunction · 0.50
ti_pruss_intrFunction · 0.50
bus_dma_tag_createFunction · 0.50
bus_dmamap_createFunction · 0.50
bus_dmamem_allocFunction · 0.50
pmu_intrFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected