#define _GNU_SOURCE #include #include #include #include #include // compile with -lm #include // compile with -lpthread #include // compile with -lrt struct thread_info { pthread_t thread_id; int thread_num; }; int verbose = 0; struct thread_info *tinfo; static void* thread_start(void *arg) { int n = *(int*) arg; double x = 0.0; long i, j; for(j=0; j