summaryrefslogtreecommitdiffstats
path: root/libdimension/bench/future.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2013-03-22 21:41:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2013-03-22 21:41:45 -0400
commitc324c3a9e7558e87ec628d45d3d0577d614ee350 (patch)
treec175f3e81fa765a571f82566decc8f54af0b548a /libdimension/bench/future.c
parent62fac6e15e51422a544de01ce6cb01b0921a6706 (diff)
downloaddimension-c324c3a9e7558e87ec628d45d3d0577d614ee350.tar.xz
Use spinlock for futures when possible.faster-futures
Diffstat (limited to 'libdimension/bench/future.c')
-rw-r--r--libdimension/bench/future.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/bench/future.c b/libdimension/bench/future.c
index 5937c3c..3a9de4a 100644
--- a/libdimension/bench/future.c
+++ b/libdimension/bench/future.c
@@ -53,9 +53,9 @@ dmnsn_bench_thread(void *ptr)
printf("dmnsn_future_increment(): %ld\n", sandglass.grains);
/* Reset the progress. */
- dmnsn_lock_mutex(&future->mutex);
+ dmnsn_lock_future(future);
future->progress = 0;
- dmnsn_unlock_mutex(&future->mutex);
+ dmnsn_unlock_future(future);
/* Now run a bunch of increments concurrently. */
return dmnsn_execute_concurrently(&dmnsn_bench_future, future, nthreads);