summaryrefslogtreecommitdiffstats
path: root/libdimension/future-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/future-impl.h')
-rw-r--r--libdimension/future-impl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libdimension/future-impl.h b/libdimension/future-impl.h
index 4ec6f75..c8e5d63 100644
--- a/libdimension/future-impl.h
+++ b/libdimension/future-impl.h
@@ -42,6 +42,11 @@ struct dmnsn_future {
/** The worker thread. */
pthread_t thread;
+#if DMNSN_SPINLOCK
+ /** If spinlocks are supported, use them instead of mutexes. */
+ pthread_spinlock_t spinlock;
+#endif
+
/** Mutex to guard progress and total. */
pthread_mutex_t mutex;