summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 367f4a4)
raw | patch | inline | side by side (parent: 367f4a4)
author | Nicolas Pitre <nico@cam.org> | |
Mon, 10 Sep 2007 12:40:44 +0000 (08:40 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 10 Sep 2007 17:49:11 +0000 (10:49 -0700) |
Found by Jeff King.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | patch | blob | history |
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 42698d29486390f4aef727ef5771d87a95dbbfcc..af12e454e183d69eb34c369e2c789a7c0a921b80 100644 (file)
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
data_requester = me;
pthread_mutex_unlock(&data_provider);
pthread_mutex_lock(&data_ready);
+ pthread_mutex_unlock(&data_request);
if (!me->list_size)
return NULL;
static void ll_find_deltas(struct object_entry **list, unsigned list_size,
int window, int depth, unsigned *processed)
{
- struct thread_params p[delta_search_threads];
+ struct thread_params *target, p[delta_search_threads];
int i, ret;
unsigned chunk_size;
sublist_size++;
pthread_mutex_lock(&data_provider);
- data_requester->list = list;
- data_requester->list_size = sublist_size;
+ target = data_requester;
+ target->list = list;
+ target->list_size = sublist_size;
pthread_mutex_unlock(&data_ready);
list += sublist_size;
list_size -= sublist_size;
if (!sublist_size) {
- pthread_join(data_requester->thread, NULL);
+ pthread_join(target->thread, NULL);
i--;
}
- pthread_mutex_unlock(&data_request);
} while (i);
}