mirror of
https://github.com/git/git.git
synced 2024-11-16 14:04:52 +01:00
b361888dd5
All files that include this header file use the same four line incantation: #ifndef NO_PTHREADS #include <pthread.h> #include "thread-utils.h" #endif Move the responsibility for that gymnastics to the header file from the files that include it. This approach makes it easier to later declare new services that are related to threading in thread-utils.h and have them available to all the threading code. Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 lines
209 B
C
11 lines
209 B
C
#ifndef THREAD_COMPAT_H
|
|
#define THREAD_COMPAT_H
|
|
|
|
#ifndef NO_PTHREADS
|
|
#include <pthread.h>
|
|
|
|
extern int online_cpus(void);
|
|
extern int init_recursive_mutex(pthread_mutex_t*);
|
|
|
|
#endif
|
|
#endif /* THREAD_COMPAT_H */
|