diff options
Diffstat (limited to 'src/platform.h')
-rw-r--r-- | src/platform.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/platform.h b/src/platform.h index 7fddfc4..b4fb1b1 100644 --- a/src/platform.h +++ b/src/platform.h @@ -3,7 +3,12 @@ #include <pthread.h> -int nr_cpus(); +#ifndef PSEMNAMLEN /* defined in macOS, but not in Linux */ +#define PSEMNAMLEN 31 +#endif + +int nr_cpus(void); int set_thread_affinity(pthread_t tid, int core); +int get_random(int max); #endif /* _PLATFORM_H_ */ |