From 0acff566213fdddbc8f4561887aced121f82dc26 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 23 Apr 2014 18:12:53 -0400 Subject: future: Add a race-free way to examine a partial computation. This allows safe OpenGL previews, for example. dmnsn_future* learned the dmnsn_future_{pause,resume}() functions which cause all worker threads to block. render.test now survives Helgrind with no errors. --- libdimension/bench/future.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libdimension/bench') diff --git a/libdimension/bench/future.c b/libdimension/bench/future.c index 5937c3c..0e3acc6 100644 --- a/libdimension/bench/future.c +++ b/libdimension/bench/future.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2013 Tavian Barnes * + * Copyright (C) 2013-2014 Tavian Barnes * * * * This file is part of The Dimension Benchmark Suite. * * * @@ -58,7 +58,8 @@ dmnsn_bench_thread(void *ptr) dmnsn_unlock_mutex(&future->mutex); /* Now run a bunch of increments concurrently. */ - return dmnsn_execute_concurrently(&dmnsn_bench_future, future, nthreads); + return dmnsn_execute_concurrently(future, &dmnsn_bench_future, future, + nthreads); } int -- cgit v1.2.3