Browse Source
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>maint
Junio C Hamano
14 years ago
4 changed files with 4 additions and 12 deletions
@ -1,7 +1,11 @@
@@ -1,7 +1,11 @@
|
||||
#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 */ |
||||
|
Loading…
Reference in new issue