#include #include #define THREADS 40 void* f(void* id) { printf("Thread %ld checking in!", (long) id); printf("\n"); pthread_exit(NULL); } int main() { pthread_t threads[THREADS]; long t; for (t = 0; t < THREADS; t++) { pthread_create(&threads[t], NULL, f, (void *)t); } pthread_exit(NULL); }