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

Function atomic_subtract_32

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

Source from the content-addressed store, hash-verified

761ATOMIC_ACQ_REL_LONG(set)
762
763static __inline void
764atomic_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
779static __inline void
780atomic_subtract_64(volatile uint64_t *p, uint64_t val)

Callers 4

atomic_subtract_longFunction · 0.70
bus_dma_tag_destroyFunction · 0.50
bus_dmamap_destroyFunction · 0.50
bus_dmamem_freeFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected