#include #include #include #include volatile int foo; void * busybee(void *unused) { while (1) foo++; } int main(void) { #define THC 32 pthread_t th[THC]; for (int i = 0; i < THC; i++) if (pthread_create(&th[i], NULL, busybee, NULL) != 0) err(1, "pthread_create"); while (1) sleep(99999); }