probleme avec pthread_join
hello
alors voila j'ai un problème que je ne comprend pas...
j'ai un pthread_join qui est totalement ignorer...
je précise que mon pthread_t est dans une structure
mon main
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
int main()
{
pthread_t objet;
Object *list;
int compt = 0;
int nb_objet = 2;
list = malloc (sizeof(Object));
list->suivant = NULL;
create_object (list);
create_object (list);
while(compt < nb_objet)
{
list = list->suivant;
pthread_join(list->t_object, NULL);
compt++;
printf("%u\n", list->t_object);
}
while(compt != 0)
{
list = list->precedent;
compt--;
}
getchar(); //en remplacement du pthread_join... a supprimer
return (0);
} |
la structure
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#define c_ptr 10
struct Object
{
pthread_t t_object;
void (*table_ptr_fonct[c_ptr])(void *); //tableau de pointeur de fonction
Object *suivant; //liste chainer
Object *precedent;
Coord *coord;
Donne *donne;
}; |
le code est dispo integrallement ici
je vous remercie de votre aide^^