aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2012-07-20 15:25:52 -0400
committerThomas White <taw@bitwiz.org.uk>2012-07-20 15:25:52 -0400
commit6eb751c2230226723884cc7bc473d65b91064b81 (patch)
tree6fb1f85964efc339c6c987600eba1d1586228b6c /src
parent87f6f2a16d642df8f846f432151cb803b766b3cb (diff)
Break down locking a bit
Diffstat (limited to 'src')
-rw-r--r--src/im-sandbox.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index eb823683..b2f14bbb 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -895,8 +895,10 @@ void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
}
}
+ unlock_sandbox(sb);
/* Update progress */
+ lock_sandbox(sb);
tNow = get_monotonic_seconds();
if ( tNow >= sb->t_last_stats+STATS_EVERY_N_SECONDS ) {
@@ -911,8 +913,10 @@ void create_sandbox(struct index_args *iargs, int n_proc, char *prefix,
sb->t_last_stats = tNow;
}
+ unlock_sandbox(sb);
allDone = 1;
+ lock_sandbox(sb);
for ( i=0; i<n_proc; i++ ) {
if ( sb->running[i] ) allDone = 0;
}