Please sign in to comment.
thread-utils.h: simplify the inclusion
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 <email@example.com>
- Loading branch information...
Showing with 4 additions and 12 deletions.
|@@ -1,7 +1,11 @@|
|extern int online_cpus(void);|
|extern int init_recursive_mutex(pthread_mutex_t*);|
|#endif /* THREAD_COMPAT_H */|