Endurance
March 2nd, 2008, 11:07 AM
Hello everyone,
Im trying to create 7 threads in a row, very simple. I want all threads to be created, even if the previous thread hasnt finished yet. I am using the <pthread.h> include. Here is the part of my code where I create the threads:
pthread_t tid1, tid2;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_create(&tid1, NULL, Process1(), NULL); /*this works fine*/
pthread_create(&tid2, NULL, Process2(), NULL); /*doesnt get here*/
Code is written in C and compiled in unix using gcc and -lpthread switch.
Daniel
Im trying to create 7 threads in a row, very simple. I want all threads to be created, even if the previous thread hasnt finished yet. I am using the <pthread.h> include. Here is the part of my code where I create the threads:
pthread_t tid1, tid2;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_create(&tid1, NULL, Process1(), NULL); /*this works fine*/
pthread_create(&tid2, NULL, Process2(), NULL); /*doesnt get here*/
Code is written in C and compiled in unix using gcc and -lpthread switch.
Daniel