version 1.19, 2010/04/27 15:53:36
|
version 1.23, 2010/04/29 07:30:58
|
Line 447 rplinit(int argc, char *argv[], unsigned
|
Line 447 rplinit(int argc, char *argv[], unsigned
|
return(EXIT_FAILURE); |
return(EXIT_FAILURE); |
} |
} |
|
|
|
if (sigaction(SIGFABORT, &action, NULL) != 0) |
|
{ |
|
erreur = d_es_signal; |
|
|
|
if ((*s_etat_processus).langue == 'F') |
|
{ |
|
printf("+++Système : Initialisation des signaux POSIX " |
|
"impossible\n"); |
|
} |
|
else |
|
{ |
|
printf("+++System : Initialization of POSIX signals failed\n"); |
|
} |
|
|
|
return(EXIT_FAILURE); |
|
} |
|
|
action.sa_sigaction = interruption8; |
action.sa_sigaction = interruption8; |
action.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; |
action.sa_flags = SA_NODEFER | SA_ONSTACK | SA_SIGINFO; |
|
|
Line 1840 rplinit(int argc, char *argv[], unsigned
|
Line 1857 rplinit(int argc, char *argv[], unsigned
|
(*s_etat_processus).pile_origine_interruptions[i] = NULL; |
(*s_etat_processus).pile_origine_interruptions[i] = NULL; |
} |
} |
|
|
(*s_etat_processus).on_exit = NULL; |
(*s_etat_processus).at_exit = NULL; |
|
|
(*s_etat_processus).pointeurs_caracteres = NULL; |
(*s_etat_processus).pointeurs_caracteres = NULL; |
(*s_etat_processus).arbre_instructions = NULL; |
(*s_etat_processus).arbre_instructions = NULL; |
Line 1857 rplinit(int argc, char *argv[], unsigned
|
Line 1874 rplinit(int argc, char *argv[], unsigned
|
(*s_etat_processus).var_volatile_traitement_sigint = 0; |
(*s_etat_processus).var_volatile_traitement_sigint = 0; |
(*s_etat_processus).var_volatile_recursivite = 0; |
(*s_etat_processus).var_volatile_recursivite = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
(*s_etat_processus).var_volatile_exception_gsl = 0; |
|
(*s_etat_processus).arret_depuis_abort = 0; |
|
|
initialisation_allocateur(s_etat_processus); |
initialisation_allocateur(s_etat_processus); |
initialisation_drapeaux(s_etat_processus); |
initialisation_drapeaux(s_etat_processus); |
Line 2623 rplinit(int argc, char *argv[], unsigned
|
Line 2641 rplinit(int argc, char *argv[], unsigned
|
|
|
if (erreur == d_absence_erreur) |
if (erreur == d_absence_erreur) |
{ |
{ |
erreur = evaluation(s_etat_processus, |
if (((*s_etat_processus).var_volatile_alarme == 0) |
(*s_etat_processus).on_exit, 'E'); |
&& ((*s_etat_processus).arret_depuis_abort |
|
== 0) && ((*s_etat_processus).at_exit |
|
!= NULL)) |
|
{ |
|
erreur = evaluation(s_etat_processus, |
|
(*s_etat_processus).at_exit, 'E'); |
|
} |
} |
} |
|
|
liberation(s_etat_processus, |
liberation(s_etat_processus, |
(*s_etat_processus).on_exit); |
(*s_etat_processus).at_exit); |
} |
} |
|
|
if ((*s_etat_processus).generateur_aleatoire != NULL) |
if ((*s_etat_processus).generateur_aleatoire != NULL) |
Line 2747 rplinit(int argc, char *argv[], unsigned
|
Line 2771 rplinit(int argc, char *argv[], unsigned
|
} |
} |
else |
else |
{ |
{ |
kill((*(*((struct_processus_fils *) |
if ((*s_etat_processus).arret_depuis_abort |
(*(*((struct_liste_chainee *) |
== -1) |
l_element_courant)).donnee).objet)) |
{ |
.thread).pid, SIGFSTOP); |
kill((*(*((struct_processus_fils *) |
|
(*(*((struct_liste_chainee *) |
|
l_element_courant)).donnee).objet)) |
|
.thread).pid, SIGFABORT); |
|
} |
|
else |
|
{ |
|
kill((*(*((struct_processus_fils *) |
|
(*(*((struct_liste_chainee *) |
|
l_element_courant)).donnee).objet)) |
|
.thread).pid, SIGFSTOP); |
|
} |
} |
} |
} |
} |
else |
else |
Line 2775 rplinit(int argc, char *argv[], unsigned
|
Line 2810 rplinit(int argc, char *argv[], unsigned
|
} |
} |
else |
else |
{ |
{ |
pthread_kill((*(*((struct_processus_fils *) |
if ((*s_etat_processus).arret_depuis_abort |
(*(*((struct_liste_chainee *) |
== -1) |
l_element_courant)).donnee).objet)) |
{ |
.thread).tid, SIGFSTOP); |
pthread_kill( |
|
(*(*((struct_processus_fils *) |
|
(*(*((struct_liste_chainee *) |
|
l_element_courant)).donnee) |
|
.objet)).thread).tid, |
|
SIGFABORT); |
|
} |
|
else |
|
{ |
|
pthread_kill( |
|
(*(*((struct_processus_fils *) |
|
(*(*((struct_liste_chainee *) |
|
l_element_courant)).donnee) |
|
.objet)).thread).tid, |
|
SIGFSTOP); |
|
} |
} |
} |
} |
} |
|
|
Line 2811 rplinit(int argc, char *argv[], unsigned
|
Line 2861 rplinit(int argc, char *argv[], unsigned
|
l_element_courant = (void *) |
l_element_courant = (void *) |
(*s_etat_processus).l_base_pile_processus; |
(*s_etat_processus).l_base_pile_processus; |
|
|
if ((*s_etat_processus) |
|
.nombre_interruptions_non_affectees != 0) |
|
{ |
|
affectation_interruptions_logicielles( |
|
s_etat_processus); |
|
} |
|
|
|
for(i = 0; i < (unsigned long) |
for(i = 0; i < (unsigned long) |
(*(*((struct_processus_fils *) |
(*(*((struct_processus_fils *) |
(*(*((struct_liste_chainee *) |
(*(*((struct_liste_chainee *) |
Line 2876 rplinit(int argc, char *argv[], unsigned
|
Line 2919 rplinit(int argc, char *argv[], unsigned
|
} |
} |
|
|
pthread_mutex_unlock(&((*s_etat_processus).mutex)); |
pthread_mutex_unlock(&((*s_etat_processus).mutex)); |
|
|
|
if ((*s_etat_processus) |
|
.nombre_interruptions_non_affectees != 0) |
|
{ |
|
affectation_interruptions_logicielles( |
|
s_etat_processus); |
|
} |
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
pthread_mutex_lock(&((*s_etat_processus).mutex)); |
pthread_mutex_lock(&((*s_etat_processus).mutex)); |
} |
} |