version 1.42, 2012/10/01 11:05:04
|
version 1.52, 2013/02/27 17:11:42
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.11 |
RPL/2 (R) version 4.1.13 |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 457 instruction_fleche(struct_processus *s_e
|
Line 457 instruction_fleche(struct_processus *s_e
|
if (recherche_variable_statique(s_etat_processus, s_variable.nom, |
if (recherche_variable_statique(s_etat_processus, s_variable.nom, |
position_variable, |
position_variable, |
((*s_etat_processus).mode_execution_programme == 'Y') |
((*s_etat_processus).mode_execution_programme == 'Y') |
? 'P' : 'E') == d_vrai) |
? 'P' : 'E') != NULL) |
{ |
{ |
// Variable statique à utiliser |
// Variable statique à utiliser |
|
|
Line 470 instruction_fleche(struct_processus *s_e
|
Line 470 instruction_fleche(struct_processus *s_e
|
s_variable.origine = 'E'; |
s_variable.origine = 'E'; |
} |
} |
|
|
s_variable.objet = (*s_etat_processus) |
s_variable.objet = (*(*s_etat_processus) |
.s_liste_variables_statiques[(*s_etat_processus) |
.pointeur_variable_statique_courante).objet; |
.position_variable_statique_courante].objet; |
(*(*s_etat_processus).pointeur_variable_statique_courante) |
(*s_etat_processus).s_liste_variables_statiques |
.objet = NULL; |
[(*s_etat_processus) |
|
.position_variable_statique_courante].objet = NULL; |
|
} |
} |
else |
else |
{ |
{ |
Line 551 instruction_fleche(struct_processus *s_e
|
Line 549 instruction_fleche(struct_processus *s_e
|
(*s_etat_processus).objet_courant; |
(*s_etat_processus).objet_courant; |
} |
} |
|
|
if (pthread_mutex_lock(&((*(*s_etat_processus) |
if (pthread_mutex_lock(&mutex_creation_variable_partagee) != 0) |
.s_liste_variables_partagees).mutex)) != 0) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 561 instruction_fleche(struct_processus *s_e
|
Line 558 instruction_fleche(struct_processus *s_e
|
if (recherche_variable_partagee(s_etat_processus, s_variable.nom, |
if (recherche_variable_partagee(s_etat_processus, s_variable.nom, |
position_variable, |
position_variable, |
((*s_etat_processus).mode_execution_programme == 'Y') |
((*s_etat_processus).mode_execution_programme == 'Y') |
? 'P' : 'E') == d_vrai) |
? 'P' : 'E') != NULL) |
{ |
{ |
// Variable partagée à utiliser |
// Variable partagée à utiliser |
|
|
|
if (pthread_mutex_unlock(&mutex_creation_variable_partagee) |
|
!= 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
.s_liste_variables_partagees).mutex)) != 0) |
.pointeur_variable_partagee_courante).mutex)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 589 instruction_fleche(struct_processus *s_e
|
Line 593 instruction_fleche(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
// Variable partagée à utiliser |
|
// Variable partagee à créer |
// Variable partagee à créer |
|
|
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
Line 598 instruction_fleche(struct_processus *s_e
|
Line 601 instruction_fleche(struct_processus *s_e
|
+ 1) * sizeof(unsigned char))) == NULL) |
+ 1) * sizeof(unsigned char))) == NULL) |
{ |
{ |
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
.s_liste_variables_partagees).mutex)) != 0) |
.pointeur_variable_partagee_courante).mutex)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 650 instruction_fleche(struct_processus *s_e
|
Line 653 instruction_fleche(struct_processus *s_e
|
if (creation_variable_partagee(s_etat_processus, |
if (creation_variable_partagee(s_etat_processus, |
&s_variable_partagee) == d_erreur) |
&s_variable_partagee) == d_erreur) |
{ |
{ |
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
|
.s_liste_variables_partagees).mutex)) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
return; |
return; |
} |
} |
|
|
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
s_variable.objet = NULL; |
.s_liste_variables_partagees).mutex)) != 0) |
|
|
if (pthread_mutex_unlock(&mutex_creation_variable_partagee) |
|
!= 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
s_variable.objet = NULL; |
|
} |
} |
} |
} |
else |
else |
Line 735 instruction_fleche(struct_processus *s_e
|
Line 731 instruction_fleche(struct_processus *s_e
|
|
|
(*s_etat_processus).niveau_courant--; |
(*s_etat_processus).niveau_courant--; |
|
|
if (retrait_variable_par_niveau(s_etat_processus) == d_erreur) |
if (retrait_variables_par_niveau(s_etat_processus) == d_erreur) |
{ |
{ |
return; |
return; |
} |
} |