pthread_create(tids+0, 0, t_loop2, 0);
pthread_create(tids+1, 0, t_loop2, 0);
pthread_create(tids+2, 0, t_loop2, 0);
pthread_create(tids+3, 0, t_loop2, 0);
pthread_create(tids+0, 0, t_loop2, 0);
pthread_create(tids+1, 0, t_loop2, 0);
pthread_create(tids+2, 0, t_loop2, 0);
pthread_create(tids+3, 0, t_loop2, 0);
pthread_join(tids[0], 0);
pthread_join(tids[1], 0);
pthread_join(tids[2], 0);
pthread_join(tids[0], 0);
pthread_join(tids[1], 0);
pthread_join(tids[2], 0);