From c324c3a9e7558e87ec628d45d3d0577d614ee350 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 22 Mar 2013 21:41:45 -0400 Subject: Use spinlock for futures when possible. --- libdimension/bench/future.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdimension/bench') 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); -- cgit v1.2.3