blob: 2049cad0ab4137d4fb57178482e4f005715ce06e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
/**
Basic script for checking number of available CPU cores.
Used by tests to spawn an appropriate number of threads.
*/
#include <unistd.h>
#include <stdio.h>
int main() {
printf("%i\n", sysconf(_SC_NPROCESSORS_ONLN));
}
|