summaryrefslogtreecommitdiff
path: root/src/platform.h
blob: b4fb1b123f8d0e94da0c3aed7c8359893db02522 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef _PLATFORM_H_
#define _PLATFORM_H_

#include <pthread.h>

#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_ */