summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
commitdd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b (patch)
tree69f56b9802809276e92b5abf9e531976d041224d /builtin
parentMerge branch 'ls/travis-scriptify' into maint (diff)
parentThreadSanitizer: add suppressions (diff)
downloadtgif-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.tar.xz
Merge branch 'ma/ts-cleanups' into maint
Assorted bugfixes and clean-ups. * ma/ts-cleanups: ThreadSanitizer: add suppressions strbuf_setlen: don't write to strbuf_slopbuf pack-objects: take lock before accessing `remaining` convert: always initialize attr_action in convert_attrs
Diffstat (limited to 'builtin')
-rw-r--r--builtin/pack-objects.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index c753e9237a..bd391e97a4 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2170,7 +2170,10 @@ static void *threaded_find_deltas(void *arg)
{
struct thread_params *me = arg;
+ progress_lock();
while (me->remaining) {
+ progress_unlock();
+
find_deltas(me->list, &me->remaining,
me->window, me->depth, me->processed);
@@ -2192,7 +2195,10 @@ static void *threaded_find_deltas(void *arg)
pthread_cond_wait(&me->cond, &me->mutex);
me->data_ready = 0;
pthread_mutex_unlock(&me->mutex);
+
+ progress_lock();
}
+ progress_unlock();
/* leave ->working 1 so that this doesn't get more work assigned */
return NULL;
}