diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2013-03-22 21:41:45 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2013-03-22 21:41:45 -0400 |
commit | c324c3a9e7558e87ec628d45d3d0577d614ee350 (patch) | |
tree | c175f3e81fa765a571f82566decc8f54af0b548a /libdimension/bench | |
parent | 62fac6e15e51422a544de01ce6cb01b0921a6706 (diff) | |
download | dimension-faster-futures.tar.xz |
Use spinlock for futures when possible.faster-futures
Diffstat (limited to 'libdimension/bench')
-rw-r--r-- | libdimension/bench/future.c | 4 |
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); |