diff options
Diffstat (limited to 'thread-utils.h')
-rw-r--r-- | thread-utils.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/thread-utils.h b/thread-utils.h new file mode 100644 index 000000000..d9a769d19 --- /dev/null +++ b/thread-utils.h @@ -0,0 +1,15 @@ +#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*); + +#else + +#define online_cpus() 1 + +#endif +#endif /* THREAD_COMPAT_H */ |