version 1.18.2.1, 2011/04/11 13:02:24
|
version 1.51, 2013/06/21 14:15:55
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.22 |
RPL/2 (R) version 4.1.15 |
Copyright (C) 1989-2011 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 350 instruction_return(struct_processus *s_e
|
Line 350 instruction_return(struct_processus *s_e
|
unsigned char *instruction_majuscule; |
unsigned char *instruction_majuscule; |
unsigned char *tampon; |
unsigned char *tampon; |
|
|
unsigned long registre_position_courante; |
integer8 registre_position_courante; |
|
|
struct_liste_chainee *tampon_expression; |
struct_liste_chainee *tampon_expression; |
|
|
Line 434 instruction_return(struct_processus *s_e
|
Line 434 instruction_return(struct_processus *s_e
|
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "DO") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "WHILE") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
(strcmp(instruction_majuscule, "FOR") == 0) || |
|
(strcmp(instruction_majuscule, "FORALL") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "START") == 0) || |
(strcmp(instruction_majuscule, "SELECT") == 0) |
(strcmp(instruction_majuscule, "SELECT") == 0) || |
|
(strcmp(instruction_majuscule, "CRITICAL") == 0) |
|| (strcmp(instruction_majuscule, "CASE") == 0) |
|| (strcmp(instruction_majuscule, "CASE") == 0) |
|| (strcmp(instruction_majuscule, "<<") == 0)) |
|| (strcmp(instruction_majuscule, "<<") == 0)) |
{ |
{ |
Line 444 instruction_return(struct_processus *s_e
|
Line 446 instruction_return(struct_processus *s_e
|
analyse(s_etat_processus, NULL); |
analyse(s_etat_processus, NULL); |
} |
} |
else if ((strcmp(instruction_majuscule, "FOR") == 0) || |
else if ((strcmp(instruction_majuscule, "FOR") == 0) || |
|
(strcmp(instruction_majuscule, "FORALL") == 0) || |
(strcmp(instruction_majuscule, "START") == 0)) |
(strcmp(instruction_majuscule, "START") == 0)) |
{ |
{ |
empilement_pile_systeme(s_etat_processus); |
empilement_pile_systeme(s_etat_processus); |
Line 501 instruction_return(struct_processus *s_e
|
Line 504 instruction_return(struct_processus *s_e
|
} |
} |
} |
} |
else if (((strcmp(instruction_majuscule, "NEXT") == 0) || |
else if (((strcmp(instruction_majuscule, "NEXT") == 0) || |
(strcmp(instruction_majuscule, "STEP") == 0)) && |
(strcmp(instruction_majuscule, "STEP") == 0)) && |
((*(*s_etat_processus).l_base_pile_systeme) |
((*(*s_etat_processus).l_base_pile_systeme) |
.type_cloture != 'L')) |
.type_cloture != 'L')) |
{ |
{ |
/* |
/* |
* Libération des compteurs de boucle. |
* Libération des compteurs de boucle. |
*/ |
*/ |
|
|
presence_compteur = ((*(*s_etat_processus) |
presence_compteur = (((*(*s_etat_processus) |
.l_base_pile_systeme).type_cloture == 'F') |
.l_base_pile_systeme).type_cloture == 'F') || |
? d_vrai : d_faux; |
((*(*s_etat_processus).l_base_pile_systeme) |
|
.type_cloture == 'A')) ? d_vrai : d_faux; |
|
|
if (((*(*s_etat_processus).l_base_pile_systeme) |
if (((*(*s_etat_processus).l_base_pile_systeme) |
.type_cloture != 'S') && |
.type_cloture != 'S') && |
Line 534 instruction_return(struct_processus *s_e
|
Line 538 instruction_return(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (((*s_etat_processus).s_liste_variables |
if ((*(*s_etat_processus) |
[(*s_etat_processus) |
.pointeur_variable_courante).objet == NULL) |
.position_variable_courante]).objet == NULL) |
|
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_execution = |
(*s_etat_processus).erreur_execution = |
Line 544 instruction_return(struct_processus *s_e
|
Line 547 instruction_return(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
(*(*s_etat_processus).l_base_pile_systeme) |
(*s_etat_processus).niveau_courant--; |
.indice_boucle = ((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante]).objet; |
|
|
|
if (presence_compteur == d_vrai) |
if (retrait_variables_par_niveau( |
|
s_etat_processus) == d_erreur) |
{ |
{ |
(*s_etat_processus).niveau_courant--; |
return; |
|
|
if (retrait_variable_par_niveau( |
|
s_etat_processus) == d_erreur) |
|
{ |
|
return; |
|
} |
|
} |
} |
} |
} |
|
|
(*(*s_etat_processus).l_base_pile_systeme) |
|
.indice_boucle = NULL; |
|
|
|
depilement_pile_systeme(s_etat_processus); |
depilement_pile_systeme(s_etat_processus); |
|
|
if ((*s_etat_processus).erreur_systeme != d_es) |
if ((*s_etat_processus).erreur_systeme != d_es) |
Line 573 instruction_return(struct_processus *s_e
|
Line 565 instruction_return(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
|
if ((*s_etat_processus).l_base_pile_systeme == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
if ((*(*s_etat_processus).l_base_pile_systeme) |
|
.type_cloture == 'Q') |
|
{ |
|
if (pthread_mutex_unlock( |
|
&mutex_sections_critiques) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
(*s_etat_processus).sections_critiques--; |
|
} |
|
|
depilement_pile_systeme(s_etat_processus); |
depilement_pile_systeme(s_etat_processus); |
|
|
if ((*s_etat_processus).erreur_systeme != d_es) |
if ((*s_etat_processus).erreur_systeme != d_es) |
Line 671 instruction_return(struct_processus *s_e
|
Line 684 instruction_return(struct_processus *s_e
|
(fonction == instruction_do) || |
(fonction == instruction_do) || |
(fonction == instruction_while) || |
(fonction == instruction_while) || |
(fonction == instruction_for) || |
(fonction == instruction_for) || |
|
(fonction == instruction_forall) || |
(fonction == instruction_start) || |
(fonction == instruction_start) || |
(fonction == instruction_select) || |
(fonction == instruction_select) || |
|
(fonction == instruction_critical) || |
(fonction == instruction_case) || |
(fonction == instruction_case) || |
(fonction == instruction_vers_niveau_superieur)) |
(fonction == instruction_vers_niveau_superieur)) |
{ |
{ |
Line 682 instruction_return(struct_processus *s_e
|
Line 697 instruction_return(struct_processus *s_e
|
instruction_vers_niveau_superieur); |
instruction_vers_niveau_superieur); |
} |
} |
else if ((fonction == instruction_for) || |
else if ((fonction == instruction_for) || |
|
(fonction == instruction_forall) || |
(fonction == instruction_start)) |
(fonction == instruction_start)) |
{ |
{ |
empilement_pile_systeme(s_etat_processus); |
empilement_pile_systeme(s_etat_processus); |
Line 743 instruction_return(struct_processus *s_e
|
Line 759 instruction_return(struct_processus *s_e
|
* Libération des compteurs de boucle. |
* Libération des compteurs de boucle. |
*/ |
*/ |
|
|
presence_compteur = ((*(*s_etat_processus) |
presence_compteur = (((*(*s_etat_processus) |
.l_base_pile_systeme).type_cloture == 'F') |
.l_base_pile_systeme).type_cloture == 'F') || |
? d_vrai : d_faux; |
((*(*s_etat_processus).l_base_pile_systeme) |
|
.type_cloture == 'A')) ? d_vrai : d_faux; |
|
|
if (((*(*s_etat_processus).l_base_pile_systeme) |
if (((*(*s_etat_processus).l_base_pile_systeme) |
.type_cloture != 'S') && |
.type_cloture != 'S') && |
Line 768 instruction_return(struct_processus *s_e
|
Line 785 instruction_return(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if ((*s_etat_processus).s_liste_variables |
if ((*(*s_etat_processus).pointeur_variable_courante) |
[(*s_etat_processus).position_variable_courante] |
|
.objet == NULL) |
.objet == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
Line 778 instruction_return(struct_processus *s_e
|
Line 794 instruction_return(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
(*(*s_etat_processus).l_base_pile_systeme) |
(*s_etat_processus).niveau_courant--; |
.indice_boucle = ((*s_etat_processus) |
|
.s_liste_variables[(*s_etat_processus) |
|
.position_variable_courante]).objet; |
|
|
|
if (presence_compteur == d_vrai) |
if (retrait_variables_par_niveau(s_etat_processus) |
|
== d_erreur) |
{ |
{ |
(*s_etat_processus).niveau_courant--; |
return; |
|
|
if (retrait_variable_par_niveau(s_etat_processus) |
|
== d_erreur) |
|
{ |
|
return; |
|
} |
|
} |
} |
} |
} |
|
|
(*(*s_etat_processus).l_base_pile_systeme) |
|
.indice_boucle = NULL; |
|
|
|
depilement_pile_systeme(s_etat_processus); |
depilement_pile_systeme(s_etat_processus); |
} |
} |
else |
else |
{ |
{ |
|
if ((*s_etat_processus).l_base_pile_systeme == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
if ((*(*s_etat_processus).l_base_pile_systeme) |
|
.type_cloture == 'Q') |
|
{ |
|
if (pthread_mutex_unlock( |
|
&mutex_sections_critiques) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = |
|
d_es_processus; |
|
return; |
|
} |
|
|
|
(*s_etat_processus).sections_critiques--; |
|
} |
|
|
depilement_pile_systeme(s_etat_processus); |
depilement_pile_systeme(s_etat_processus); |
|
|
if ((*s_etat_processus).erreur_systeme != d_es) |
if ((*s_etat_processus).erreur_systeme != d_es) |
Line 860 instruction_rdm(struct_processus *s_etat
|
Line 886 instruction_rdm(struct_processus *s_etat
|
logical1 drapeau_fin_objet_originel; |
logical1 drapeau_fin_objet_originel; |
logical1 variable_partagee; |
logical1 variable_partagee; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
unsigned long k; |
integer8 k; |
unsigned long l; |
integer8 l; |
unsigned long nombre_colonnes; |
integer8 nombre_colonnes; |
unsigned long nombre_dimensions; |
integer8 nombre_dimensions; |
unsigned long nombre_lignes; |
integer8 nombre_lignes; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 940 instruction_rdm(struct_processus *s_etat
|
Line 966 instruction_rdm(struct_processus *s_etat
|
|
|
liberation(s_etat_processus, s_objet_initial); |
liberation(s_etat_processus, s_objet_initial); |
|
|
if ((*s_etat_processus).s_liste_variables[(*s_etat_processus) |
if ((*(*s_etat_processus).pointeur_variable_courante) |
.position_variable_courante].variable_verrouillee == d_vrai) |
.variable_verrouillee == d_vrai) |
{ |
{ |
(*s_etat_processus).erreur_execution = d_ex_variable_verrouillee; |
(*s_etat_processus).erreur_execution = d_ex_variable_verrouillee; |
|
|
Line 949 instruction_rdm(struct_processus *s_etat
|
Line 975 instruction_rdm(struct_processus *s_etat
|
return; |
return; |
} |
} |
|
|
s_objet_initial = (*s_etat_processus).s_liste_variables |
s_objet_initial = (*(*s_etat_processus).pointeur_variable_courante) |
[(*s_etat_processus).position_variable_courante].objet; |
.objet; |
|
|
if (s_objet_initial == NULL) |
if (s_objet_initial == NULL) |
{ |
{ |
if (pthread_mutex_lock(&((*(*s_etat_processus) |
|
.s_liste_variables_partagees).mutex)) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (recherche_variable_partagee(s_etat_processus, |
if (recherche_variable_partagee(s_etat_processus, |
(*s_etat_processus).s_liste_variables |
(*(*s_etat_processus).pointeur_variable_courante).nom, |
[(*s_etat_processus).position_variable_courante].nom, |
(*(*s_etat_processus).pointeur_variable_courante) |
(*s_etat_processus).s_liste_variables |
.variable_partagee, (*(*s_etat_processus) |
[(*s_etat_processus).position_variable_courante] |
.pointeur_variable_courante).origine) == NULL) |
.variable_partagee, (*s_etat_processus).s_liste_variables |
|
[(*s_etat_processus).position_variable_courante].origine) |
|
== d_faux) |
|
{ |
{ |
if (pthread_mutex_unlock(&((*(*s_etat_processus) |
|
.s_liste_variables_partagees).mutex)) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_execution = |
(*s_etat_processus).erreur_execution = |
d_ex_variable_non_definie; |
d_ex_variable_non_definie; |
Line 999 instruction_rdm(struct_processus *s_etat
|
Line 1008 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1031 instruction_rdm(struct_processus *s_etat
|
Line 1040 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1061 instruction_rdm(struct_processus *s_etat
|
Line 1070 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1084 instruction_rdm(struct_processus *s_etat
|
Line 1093 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1121 instruction_rdm(struct_processus *s_etat
|
Line 1130 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1150 instruction_rdm(struct_processus *s_etat
|
Line 1159 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1166 instruction_rdm(struct_processus *s_etat
|
Line 1175 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(integer8))) == NULL) |
= malloc(((size_t) nombre_lignes) * sizeof(integer8))) |
|
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1208 instruction_rdm(struct_processus *s_etat
|
Line 1218 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1224 instruction_rdm(struct_processus *s_etat
|
Line 1234 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(real8))) == NULL) |
= malloc(((size_t) nombre_lignes) * sizeof(real8))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1267 instruction_rdm(struct_processus *s_etat
|
Line 1277 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1283 instruction_rdm(struct_processus *s_etat
|
Line 1293 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(struct_complexe16))) |
= malloc(((size_t) nombre_lignes) * |
== NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1336 instruction_rdm(struct_processus *s_etat
|
Line 1346 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1352 instruction_rdm(struct_processus *s_etat
|
Line 1362 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(integer8))) == NULL) |
= malloc(((size_t) nombre_lignes) * sizeof(integer8))) |
|
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1407 instruction_rdm(struct_processus *s_etat
|
Line 1418 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1423 instruction_rdm(struct_processus *s_etat
|
Line 1434 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(real8))) == NULL) |
= malloc(((size_t) nombre_lignes) * sizeof(real8))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1479 instruction_rdm(struct_processus *s_etat
|
Line 1490 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1495 instruction_rdm(struct_processus *s_etat
|
Line 1506 instruction_rdm(struct_processus *s_etat
|
nombre_lignes; |
nombre_lignes; |
|
|
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_vecteur *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(struct_complexe16))) |
= malloc(((size_t) nombre_lignes) * |
== NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1556 instruction_rdm(struct_processus *s_etat
|
Line 1567 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1594 instruction_rdm(struct_processus *s_etat
|
Line 1605 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1612 instruction_rdm(struct_processus *s_etat
|
Line 1623 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(integer8 *))) |
= malloc(((size_t) nombre_lignes) * sizeof(integer8 *))) |
== NULL) |
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1633 instruction_rdm(struct_processus *s_etat
|
Line 1644 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((integer8 **) (*((struct_matrice *) |
if ((((integer8 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * sizeof(integer8))) == NULL) |
malloc(((size_t) nombre_colonnes) * sizeof(integer8))) |
|
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1679 instruction_rdm(struct_processus *s_etat
|
Line 1692 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1697 instruction_rdm(struct_processus *s_etat
|
Line 1710 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(real8 *))) |
= malloc(((size_t) nombre_lignes) * sizeof(real8 *))) |
== NULL) |
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1718 instruction_rdm(struct_processus *s_etat
|
Line 1731 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((real8 **) (*((struct_matrice *) |
if ((((real8 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * sizeof(real8))) == NULL) |
malloc(((size_t) nombre_colonnes) * sizeof(real8))) |
|
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1764 instruction_rdm(struct_processus *s_etat
|
Line 1779 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1782 instruction_rdm(struct_processus *s_etat
|
Line 1797 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(struct_complexe16 *))) |
= malloc(((size_t) nombre_lignes) * |
== NULL) |
sizeof(struct_complexe16 *))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1803 instruction_rdm(struct_processus *s_etat
|
Line 1818 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((struct_complexe16 **) (*((struct_matrice *) |
if ((((struct_complexe16 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * |
malloc(((size_t) nombre_colonnes) * |
sizeof(struct_complexe16))) == NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1861 instruction_rdm(struct_processus *s_etat
|
Line 1877 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1879 instruction_rdm(struct_processus *s_etat
|
Line 1895 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(integer8 *))) |
= malloc(((size_t) nombre_lignes) * sizeof(integer8 *))) |
== NULL) |
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1902 instruction_rdm(struct_processus *s_etat
|
Line 1918 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((integer8 **) (*((struct_matrice *) |
if ((((integer8 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * |
malloc(((size_t) nombre_colonnes) * |
sizeof(integer8))) == NULL) |
sizeof(integer8))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1960 instruction_rdm(struct_processus *s_etat
|
Line 1977 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 1978 instruction_rdm(struct_processus *s_etat
|
Line 1995 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(real8 *))) |
= malloc(((size_t) nombre_lignes) * sizeof(real8 *))) |
== NULL) |
== NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2001 instruction_rdm(struct_processus *s_etat
|
Line 2018 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((real8 **) (*((struct_matrice *) |
if ((((real8 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * |
malloc(((size_t) nombre_colonnes) * |
sizeof(real8))) == NULL) |
sizeof(real8))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2059 instruction_rdm(struct_processus *s_etat
|
Line 2077 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2077 instruction_rdm(struct_processus *s_etat
|
Line 2095 instruction_rdm(struct_processus *s_etat
|
.nombre_colonnes = nombre_colonnes; |
.nombre_colonnes = nombre_colonnes; |
|
|
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
if (((*((struct_matrice *) (*s_objet_redimensionne).objet)).tableau |
= malloc(nombre_lignes * sizeof(struct_complexe16 *))) |
= malloc(((size_t) nombre_lignes) |
== NULL) |
* sizeof(struct_complexe16 *))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2100 instruction_rdm(struct_processus *s_etat
|
Line 2118 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if ((((struct_complexe16 **) (*((struct_matrice *) |
if ((((struct_complexe16 **) (*((struct_matrice *) |
(*s_objet_redimensionne).objet)).tableau)[i] = |
(*s_objet_redimensionne).objet)).tableau)[i] = |
malloc(nombre_colonnes * |
malloc(((size_t) nombre_colonnes) * |
sizeof(struct_complexe16))) == NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2164 instruction_rdm(struct_processus *s_etat
|
Line 2183 instruction_rdm(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
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 2199 instruction_rdm(struct_processus *s_etat
|
Line 2218 instruction_rdm(struct_processus *s_etat
|
{ |
{ |
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
(*(*s_etat_processus).s_liste_variables_partagees).table |
(*(*s_etat_processus).pointeur_variable_partagee_courante).objet = |
[(*(*s_etat_processus).s_liste_variables_partagees) |
s_objet_redimensionne; |
.position_variable].objet = s_objet_redimensionne; |
|
|
|
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 2212 instruction_rdm(struct_processus *s_etat
|
Line 2230 instruction_rdm(struct_processus *s_etat
|
} |
} |
else |
else |
{ |
{ |
(*s_etat_processus).s_liste_variables |
(*(*s_etat_processus).pointeur_variable_courante).objet = |
[(*s_etat_processus).position_variable_courante].objet = |
|
s_objet_redimensionne; |
s_objet_redimensionne; |
} |
} |
} |
} |