Yes moving pthread_cond_signal(&testCond) to after the compute() function worked. Also, I created an int variable to keep to make sure the threads go in order.
Type: Posts; User: hamsasimon
Yes moving pthread_cond_signal(&testCond) to after the compute() function worked. Also, I created an int variable to keep to make sure the threads go in order.
note: I'm currently using mac os X so I couldn't use the pthread_barrier primitive.
I'm trying to hold a 'n' number of threads to do a matrix computation on two matrices. Only once every thread...
Thank you, that makes sense.
OK, that helps a lot with understanding threads. So, when we call the pthread_create() function are we creating a child of the main thread? just as a process would? so, it returns 0 when child...
In the documentation that I found on the internet for pthread_join
the function declaration is the following:
int pthread_join(pthread_t thread, void **retval);
where pthread_create is:
...