void * fctLanceur() { while(1) { alarm(4); pause(); } } void handlerSigAlarme(int sig) { struct Balle *b; b = (struct Balle *) malloc (sizeof(struct Balle)); do { b->ligne = rand()%13 + 1; b->colonne = rand()%28 + 1; }while(Terrain[b->ligne][b->colonne] == BALLE || Terrain[b->ligne][b->colonne] == ZONE); do { b->couleur = rand()%10; }while(b->couleur == BLANC || b->couleur == NOIR || b->couleur == GRIS); b->dir = rand()%2; pthread_create(&threadHandle, NULL, (void*(*)(void*))fctBalle,b); }