Subj : Help me using pthreah!!! :) please... To : comp.programming.threads From : tranky Date : Sat Jun 25 2005 12:26 pm Hello! I'm an italian unix user, i don't know unix very well, so...i need your help. Excuse me for my english, but english teacher in italy are not good! :) I've this code of Reader-Writer Problem. I want that writer 2 starts N seconds after the execution of writer1. What i will do?? I thing i will use the function pthread_kill e sigwait, but i don't know how to! Can you help me please?? (and if is possible can you say me how create a sixth thread that starts ever N second after the starting of the program?!?) :) I hope you can decode my english and help me! thank u! void *reader1(void *id_lettore1) { do{ .... } while(1); } void *reader2(void *id_lettore2) { do{ .... } while (1); } void *reader3(void *id_lettore3) { do{ .... } while (1); } void *writer1(void *id_scrittore1) { do{ .... } while (1); } void *writer2(void *id_scrittore2) { do{ .... } while (1); } int main(int argc, char *argv[]) { pthread_setconcurrency(5); .... if (pthread_create(&ts1, NULL,writer1, (void*)1) != 0){ printf("pthread_create fallita!\n"); exit(0); } if (pthread_create(&ts2, NULL,writer2, (void*)2) != 0){ printf("pthread_create fallita!\n"); exit(0); } if (pthread_create(&tl1, NULL,reader1, (void*)1) != 0){ printf("pthread_create fallita!\n"); exit(0); } if (pthread_create(&tl2, NULL,reader2, (void*)2) != 0){ printf("pthread_create fallita!\n"); exit(0); } if (pthread_create(&tl3, NULL,reader3, (void*)3) != 0){ printf("pthread_create fallita!\n"); exit(0); } pthread_exit(NULL); return 0; } .