Add/use adaptive spinning.

Add spin_t and spin_{init,adaptive}(), which provide a simple
abstraction for adaptive spinning.

Adaptively spin during busy waits in bootstrapping and rtree node
initialization.
This commit is contained in:
Jason Evans
2016-10-13 14:47:50 -07:00
parent a2539fab95
commit 9737685943
6 changed files with 66 additions and 2 deletions

View File

@@ -101,6 +101,7 @@ C_SRCS := $(srcroot)src/jemalloc.c \
$(srcroot)src/quarantine.c \
$(srcroot)src/rtree.c \
$(srcroot)src/stats.c \
$(srcroot)src/spin.c \
$(srcroot)src/tcache.c \
$(srcroot)src/ticker.c \
$(srcroot)src/tsd.c \