Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
attr.c: remove #ifdef NO_PTHREADS
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sat, 3 Nov 2018 08:48:42 +0000
(09:48 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 5 Nov 2018 04:42:11 +0000
(13:42 +0900)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0764294
)
diff --git
a/attr.c
b/attr.c
index 60d284796de728f59b839865eb035e1289a1a060..eaece6658d64b2129332ffab39e30485730f3306 100644
(file)
--- 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;
struct attr_hashmap {
struct hashmap map;
-#ifndef NO_PTHREADS
pthread_mutex_t mutex;
pthread_mutex_t mutex;
-#endif
};
static inline void hashmap_lock(struct attr_hashmap *map)
{
};
static inline void hashmap_lock(struct attr_hashmap *map)
{
-#ifndef NO_PTHREADS
pthread_mutex_lock(&map->mutex);
pthread_mutex_lock(&map->mutex);
-#endif
}
static inline void hashmap_unlock(struct attr_hashmap *map)
{
}
static inline void hashmap_unlock(struct attr_hashmap *map)
{
-#ifndef NO_PTHREADS
pthread_mutex_unlock(&map->mutex);
pthread_mutex_unlock(&map->mutex);
-#endif
}
/*
}
/*
@@
-498,23
+492,17
@@
static struct check_vector {
size_t nr;
size_t alloc;
struct attr_check **checks;
size_t nr;
size_t alloc;
struct attr_check **checks;
-#ifndef NO_PTHREADS
pthread_mutex_t mutex;
pthread_mutex_t mutex;
-#endif
} check_vector;
static inline void vector_lock(void)
{
} check_vector;
static inline void vector_lock(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_lock(&check_vector.mutex);
pthread_mutex_lock(&check_vector.mutex);
-#endif
}
static inline void vector_unlock(void)
{
}
static inline void vector_unlock(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_unlock(&check_vector.mutex);
pthread_mutex_unlock(&check_vector.mutex);
-#endif
}
static void check_vector_add(struct attr_check *c)
}
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)
{
void attr_start(void)
{
-#ifndef NO_PTHREADS
pthread_mutex_init(&g_attr_hashmap.mutex, NULL);
pthread_mutex_init(&check_vector.mutex, NULL);
pthread_mutex_init(&g_attr_hashmap.mutex, NULL);
pthread_mutex_init(&check_vector.mutex, NULL);
-#endif
}
}