summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-11-03 09:48:42 +0100
committerJunio C Hamano <gitster@pobox.com>2018-11-05 13:42:11 +0900
commit2e1b141a0132ad3afe2c81e43c4d2c9d394f5b1a (patch)
tree4a5efdc64ac5e7fc694da8abefa0dafe53e612e5 /attr.c
parent07642942aa02f20623191207dd0a2730752c9533 (diff)
downloadgit-2e1b141a0132ad3afe2c81e43c4d2c9d394f5b1a.tar.gz
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>
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/attr.c b/attr.c
index 60d284796d..eaece6658d 100644
--- a/attr.c
+++ b/attr.c
@@ -41,23 +41,17 @@ const char *git_attr_name(const struct git_attr *attr)
struct attr_hashmap {
struct hashmap map;
-#ifndef NO_PTHREADS
pthread_mutex_t mutex;
-#endif
};
static inline void hashmap_lock(struct attr_hashmap *map)
{
-#ifndef NO_PTHREADS
pthread_mutex_lock(&map->mutex);
-#endif
}
static inline void hashmap_unlock(struct attr_hashmap *map)
{
-#ifndef NO_PTHREADS
pthread_mutex_unlock(&map->mutex);
-#endif
}
/*
@@ -498,23 +492,17 @@ static struct check_vector {
size_t nr;
size_t alloc;
struct attr_check **checks;
-#ifndef NO_PTHREADS
pthread_mutex_t mutex;
-#endif
} check_vector;
static inline void vector_lock(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_lock(&check_vector.mutex);
-#endif
}
static inline void vector_unlock(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_unlock(&check_vector.mutex);
-#endif
}
static void check_vector_add(struct attr_check *c)
@@ -1181,8 +1169,6 @@ void git_all_attrs(const struct index_state *istate,
void attr_start(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_init(&g_attr_hashmap.mutex, NULL);
pthread_mutex_init(&check_vector.mutex, NULL);
-#endif
}