aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
committerJunio C Hamano <gitster@pobox.com>2017-10-23 14:19:02 +0900
commitdd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b (patch)
tree69f56b9802809276e92b5abf9e531976d041224d /builtin
parenta37b73e9bb8b830a679abad23eff9b0949e07416 (diff)
parent6cdf8a7929688ea5702ab53f450d038e973e64e1 (diff)
downloadgit-dd3bfe4f5fda5e8e8093be2d18cdc80a90e25e5b.tar.gz
git-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 c753e9237..bd391e97a 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;
}