Merge branch 'nd/pthreads'
The codebase has been cleaned up to reduce "#ifndef NO_PTHREADS". * nd/pthreads: Clean up pthread_create() error handling read-cache.c: initialize copy_len to shut up gcc 8 read-cache.c: reduce branching based on HAVE_THREADS read-cache.c: remove #ifdef NO_PTHREADS pack-objects: remove #ifdef NO_PTHREADS preload-index.c: remove #ifdef NO_PTHREADS grep: clean up num_threads handling grep: remove #ifdef NO_PTHREADS attr.c: remove #ifdef NO_PTHREADS name-hash.c: remove #ifdef NO_PTHREADS index-pack: remove #ifdef NO_PTHREADS send-pack.c: move async's #ifdef NO_PTHREADS back to run-command.c run-command.h: include thread-utils.h instead of pthread.h thread-utils: macros to unconditionally compile pthreads API
This commit is contained in:
@ -145,9 +145,7 @@ struct packing_data {
|
||||
struct packed_git **in_pack_by_idx;
|
||||
struct packed_git **in_pack;
|
||||
|
||||
#ifndef NO_PTHREADS
|
||||
pthread_mutex_t lock;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This list contains entries for bases which we know the other side
|
||||
@ -169,15 +167,11 @@ void prepare_packing_data(struct packing_data *pdata);
|
||||
|
||||
static inline void packing_data_lock(struct packing_data *pdata)
|
||||
{
|
||||
#ifndef NO_PTHREADS
|
||||
pthread_mutex_lock(&pdata->lock);
|
||||
#endif
|
||||
}
|
||||
static inline void packing_data_unlock(struct packing_data *pdata)
|
||||
{
|
||||
#ifndef NO_PTHREADS
|
||||
pthread_mutex_unlock(&pdata->lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
struct object_entry *packlist_alloc(struct packing_data *pdata,
|
||||
|
||||
Reference in New Issue
Block a user