musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include/malloc.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014年08月25日 15:43:40 -0400
committerRich Felker <dalias@aerifal.cx>2014年08月25日 15:43:40 -0400
commitea818ea8340c13742a4f41e6077f732291aea4bc (patch)
treef2a97e8f8a25fc3337002aa30bb235575593af86 /include/malloc.h
parent5345c9b884e7c4e73eb2c8bb83b8d0df20f95afb (diff)
downloadmusl-ea818ea8340c13742a4f41e6077f732291aea4bc.tar.gz
add working a_spin() atomic for non-x86 targets
conceptually, a_spin needs to be at least a compiler barrier, so the compiler will not optimize out loops (and the load on each iteration) while spinning. it should also be a memory barrier, or the spinning thread might keep spinning without noticing stores from other threads, thus delaying for longer than it should. ideally, an optimal a_spin implementation that avoids unnecessary cache/memory contention should be chosen for each arch, but for now, the easiest thing is to perform a useless a_cas on the calling thread's stack.
Diffstat (limited to 'include/malloc.h')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 06:12:56 +0000

AltStyle によって変換されたページ (->オリジナル) /