summaryrefslogtreecommitdiffstats
path: root/src/spin.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-10-13 21:47:50 (GMT)
committerJason Evans <jasone@canonware.com>2016-10-13 21:55:39 (GMT)
commite5effef428b5bf941e1697f6000c97f1ce734756 (patch)
treec47df293e2107ae293644fa922876224c235c527 /src/spin.c
parent9acd5cf178eca9bc8a7f36a8c392b799a120bcbf (diff)
downloadjemalloc-e5effef428b5bf941e1697f6000c97f1ce734756.zip
jemalloc-e5effef428b5bf941e1697f6000c97f1ce734756.tar.gz
jemalloc-e5effef428b5bf941e1697f6000c97f1ce734756.tar.bz2
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.
Diffstat (limited to 'src/spin.c')
-rw-r--r--src/spin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/spin.c b/src/spin.c
new file mode 100644
index 0000000..5242d95
--- /dev/null
+++ b/src/spin.c
@@ -0,0 +1,2 @@
+#define JEMALLOC_SPIN_C_
+#include "jemalloc/internal/jemalloc_internal.h"