version 1.29, 2011/07/25 07:44:58
|
version 1.77, 2023/08/07 17:42:57
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.2 |
RPL/2 (R) version 4.1.35 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2023 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 416 instruction_return(struct_processus *s_e
|
Line 416 instruction_return(struct_processus *s_e
|
(*s_etat_processus).instruction_courante) == d_faux) |
(*s_etat_processus).instruction_courante) == d_faux) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es; |
(*s_etat_processus).erreur_systeme = d_es; |
instruction_majuscule = conversion_majuscule( |
instruction_majuscule = conversion_majuscule(s_etat_processus, |
(*s_etat_processus).instruction_courante); |
(*s_etat_processus).instruction_courante); |
|
|
if (instruction_majuscule == NULL) |
if (instruction_majuscule == NULL) |
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 543 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) |
|
.pointeur_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 571 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 669 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 680 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 741 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 775 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) |
|
.pointeur_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 856 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 950 instruction_rdm(struct_processus *s_etat
|
Line 980 instruction_rdm(struct_processus *s_etat
|
|
|
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).pointeur_variable_courante).nom, |
(*(*s_etat_processus).pointeur_variable_courante).nom, |
(*(*s_etat_processus).pointeur_variable_courante) |
(*(*s_etat_processus).pointeur_variable_courante) |
.variable_partagee, (*(*s_etat_processus) |
.variable_partagee, (*(*s_etat_processus) |
.pointeur_variable_courante).origine) |
.pointeur_variable_courante).origine) == NULL) |
== 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 993 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 1025 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 1055 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 1078 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 1115 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 1144 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 1160 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 1202 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 1218 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 1261 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 1277 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 1330 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 1346 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 1401 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 1417 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 1473 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 1489 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 1550 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 1588 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 1606 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 1627 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 1673 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 1691 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 1712 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 1758 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 1776 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 1797 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 1855 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 1873 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 1896 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 1954 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 1972 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 1995 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 2053 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 2071 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 2094 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 2158 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 2193 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; |