File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,23 +41,17 @@ const char *git_attr_name(const struct git_attr *attr)
4141
4242struct attr_hashmap {
4343 struct hashmap map ;
44- #ifndef NO_PTHREADS
4544 pthread_mutex_t mutex ;
46- #endif
4745};
4846
4947static inline void hashmap_lock (struct attr_hashmap * map )
5048{
51- #ifndef NO_PTHREADS
5249 pthread_mutex_lock (& map -> mutex );
53- #endif
5450}
5551
5652static 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
506498static inline void vector_lock (void )
507499{
508- #ifndef NO_PTHREADS
509500 pthread_mutex_lock (& check_vector .mutex );
510- #endif
511501}
512502
513503static inline void vector_unlock (void )
514504{
515- #ifndef NO_PTHREADS
516505 pthread_mutex_unlock (& check_vector .mutex );
517- #endif
518506}
519507
520508static void check_vector_add (struct attr_check * c )
@@ -1181,8 +1169,6 @@ void git_all_attrs(const struct index_state *istate,
11811169
11821170void 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}
You can’t perform that action at this time.
0 commit comments