My ThreadData struct:
typedef struct threadData {
pthread_t *ths;
} threadData;
Where *ths is an array of pthread_t
.
Now, I create a thread that uses as action the following function, which creates a new thread in ths[1]
void *rootThread(threadData *d) {
pthread_t *b = (*d).ths;
pthread_create(*(b+1),NULL,someRandomFunction,NULL);
}
But that doesn't seem to work.
I'm not sure if I'm dereferencing the pthread_t element well. Please help!
Thanks, :).