Skip to content

Commit 2e1b141

Browse files
pcloudsgitster
authored andcommitted
attr.c: remove #ifdef NO_PTHREADS
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 0764294 commit 2e1b141

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

attr.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,17 @@ const char *git_attr_name(const struct git_attr *attr)
4141

4242
struct attr_hashmap {
4343
struct hashmap map;
44-
#ifndef NO_PTHREADS
4544
pthread_mutex_t mutex;
46-
#endif
4745
};
4846

4947
static inline void hashmap_lock(struct attr_hashmap *map)
5048
{
51-
#ifndef NO_PTHREADS
5249
pthread_mutex_lock(&map->mutex);
53-
#endif
5450
}
5551

5652
static inline void hashmap_unlock(struct attr_hashmap *map)
5753
{
58-
#ifndef NO_PTHREADS
5954
pthread_mutex_unlock(&map->mutex);
60-
#endif
6155
}
6256

6357
/*
@@ -498,23 +492,17 @@ static struct check_vector {
498492
size_t nr;
499493
size_t alloc;
500494
struct attr_check **checks;
501-
#ifndef NO_PTHREADS
502495
pthread_mutex_t mutex;
503-
#endif
504496
} check_vector;
505497

506498
static inline void vector_lock(void)
507499
{
508-
#ifndef NO_PTHREADS
509500
pthread_mutex_lock(&check_vector.mutex);
510-
#endif
511501
}
512502

513503
static inline void vector_unlock(void)
514504
{
515-
#ifndef NO_PTHREADS
516505
pthread_mutex_unlock(&check_vector.mutex);
517-
#endif
518506
}
519507

520508
static void check_vector_add(struct attr_check *c)
@@ -1181,8 +1169,6 @@ void git_all_attrs(const struct index_state *istate,
11811169

11821170
void attr_start(void)
11831171
{
1184-
#ifndef NO_PTHREADS
11851172
pthread_mutex_init(&g_attr_hashmap.mutex, NULL);
11861173
pthread_mutex_init(&check_vector.mutex, NULL);
1187-
#endif
11881174
}

0 commit comments

Comments
 (0)