Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'pack-objects.h')
-rw-r--r--pack-objects.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/pack-objects.h b/pack-objects.h
index dc869f26c2..0a038e3bc6 100644
--- a/pack-objects.h
+++ b/pack-objects.h
@@ -146,6 +146,7 @@ struct packing_data {
struct packed_git **in_pack;
pthread_mutex_t lock;
+ pthread_mutex_t read_lock;
/*
* This list contains entries for bases which we know the other side
@@ -174,6 +175,15 @@ static inline void packing_data_unlock(struct packing_data *pdata)
pthread_mutex_unlock(&pdata->lock);
}
+static inline void packing_data_read_lock(struct packing_data *pdata)
+{
+ pthread_mutex_lock(&pdata->read_lock);
+}
+static inline void packing_data_read_unlock(struct packing_data *pdata)
+{
+ pthread_mutex_unlock(&pdata->read_lock);
+}
+
struct object_entry *packlist_alloc(struct packing_data *pdata,
const unsigned char *sha1,
uint32_t index_pos);