- pthread_create(&thread1, NULL, thread1_fun, NULL);
- fprintf(stderr, "here\n");
- pthread_create(&thread2, NULL, thread2_fun, NULL);
- fprintf(stderr, "there\n");
+ pthread_create(&thread1, NULL, thread_fun, (void*)&id[0]);
+ pthread_create(&thread2, NULL, thread_fun, (void*)&id[1]);
+ fprintf(stderr, "All threads are started.\n");