version 1.25, 2011/06/24 20:31:38
|
version 1.80, 2025/04/15 10:17:53
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.0.prerelease.4 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2025 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 44 instruction_idn(struct_processus *s_etat
|
Line 44 instruction_idn(struct_processus *s_etat
|
logical1 argument_nom; |
logical1 argument_nom; |
logical1 variable_partagee; |
logical1 variable_partagee; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 119 instruction_idn(struct_processus *s_etat
|
Line 119 instruction_idn(struct_processus *s_etat
|
|
|
if (s_objet_argument == NULL) |
if (s_objet_argument == 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) == d_faux) |
.pointeur_variable_courante).origine) == NULL) |
{ |
{ |
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 147 instruction_idn(struct_processus *s_etat
|
Line 133 instruction_idn(struct_processus *s_etat
|
} |
} |
|
|
s_objet_argument = (*(*s_etat_processus) |
s_objet_argument = (*(*s_etat_processus) |
.s_liste_variables_partagees).table[(*(*s_etat_processus) |
.pointeur_variable_partagee_courante).objet; |
.s_liste_variables_partagees).position_variable].objet; |
|
variable_partagee = d_vrai; |
variable_partagee = d_vrai; |
} |
} |
else |
else |
Line 181 instruction_idn(struct_processus *s_etat
|
Line 166 instruction_idn(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 215 instruction_idn(struct_processus *s_etat
|
Line 200 instruction_idn(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 238 instruction_idn(struct_processus *s_etat
|
Line 223 instruction_idn(struct_processus *s_etat
|
} |
} |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat).objet)) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat) |
.nombre_lignes * sizeof(integer8 *))) == NULL) |
.objet)).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 259 instruction_idn(struct_processus *s_etat
|
Line 244 instruction_idn(struct_processus *s_etat
|
.nombre_lignes; i++) |
.nombre_lignes; i++) |
{ |
{ |
if ((((integer8 **) (*((struct_matrice *) (*s_objet_resultat) |
if ((((integer8 **) (*((struct_matrice *) (*s_objet_resultat) |
.objet)).tableau)[i] = malloc((*((struct_matrice *) |
.objet)).tableau)[i] = malloc(((size_t) |
(*s_objet_resultat).objet)).nombre_colonnes * |
(*((struct_matrice *) (*s_objet_resultat).objet)) |
sizeof(integer8))) == NULL) |
.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 297 instruction_idn(struct_processus *s_etat
|
Line 282 instruction_idn(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 325 instruction_idn(struct_processus *s_etat
|
Line 310 instruction_idn(struct_processus *s_etat
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
(*(*s_etat_processus).pointeur_variable_courante).objet = NULL; |
(*(*s_etat_processus).pointeur_variable_courante).objet = NULL; |
(*(*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_resultat; |
.position_variable].objet = s_objet_resultat; |
|
|
|
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 375 instruction_ifft(struct_processus *s_eta
|
Line 359 instruction_ifft(struct_processus *s_eta
|
|
|
logical1 presence_longueur_fft; |
logical1 presence_longueur_fft; |
|
|
unsigned long i; |
integer8 i; |
unsigned long j; |
integer8 j; |
unsigned long k; |
integer8 k; |
unsigned long longueur_fft; |
integer8 longueur_fft; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 484 instruction_ifft(struct_processus *s_eta
|
Line 468 instruction_ifft(struct_processus *s_eta
|
{ |
{ |
if (presence_longueur_fft == d_faux) |
if (presence_longueur_fft == d_faux) |
{ |
{ |
longueur_fft = pow(2, (integer4) ceil(log((real8) |
longueur_fft = (integer8) pow(2, ceil(log((real8) |
(*((struct_vecteur *) |
(*((struct_vecteur *) |
(*s_objet_argument).objet)).taille) / log((real8) 2))); |
(*s_objet_argument).objet)).taille) / log((real8) 2))); |
|
|
if ((longueur_fft / ((real8) (*((struct_vecteur *) |
if ((((real8) longueur_fft) / ((real8) (*((struct_vecteur *) |
(*s_objet_argument).objet)).taille)) == 2) |
(*s_objet_argument).objet)).taille)) == 2) |
{ |
{ |
longueur_fft /= 2; |
longueur_fft /= 2; |
} |
} |
} |
} |
|
|
if ((matrice_f77 = malloc(longueur_fft * |
if ((matrice_f77 = malloc(((size_t) longueur_fft) * |
sizeof(struct_complexe16))) == NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 545 instruction_ifft(struct_processus *s_eta
|
Line 529 instruction_ifft(struct_processus *s_eta
|
} |
} |
|
|
nombre_lignes = 1; |
nombre_lignes = 1; |
nombre_colonnes = longueur_fft; |
nombre_colonnes = (integer4) longueur_fft; |
inverse = -1; |
inverse = -1; |
|
|
dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); |
dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); |
Line 581 instruction_ifft(struct_processus *s_eta
|
Line 565 instruction_ifft(struct_processus *s_eta
|
{ |
{ |
if (presence_longueur_fft == d_faux) |
if (presence_longueur_fft == d_faux) |
{ |
{ |
longueur_fft = pow(2, (integer4) ceil(log((real8) |
longueur_fft = (integer8) pow(2, ceil(log((real8) |
(*((struct_matrice *) |
(*((struct_matrice *) (*s_objet_argument).objet)) |
(*s_objet_argument).objet)).nombre_colonnes) / |
.nombre_colonnes) / log((real8) 2))); |
log((real8) 2))); |
|
|
|
if ((longueur_fft / ((real8) (*((struct_matrice *) |
if ((((real8) longueur_fft) / ((real8) (*((struct_matrice *) |
(*s_objet_argument).objet)).nombre_colonnes)) == 2) |
(*s_objet_argument).objet)).nombre_colonnes)) == 2) |
{ |
{ |
longueur_fft /= 2; |
longueur_fft /= 2; |
} |
} |
} |
} |
|
|
if ((matrice_f77 = malloc(longueur_fft * |
if ((matrice_f77 = malloc(((size_t) longueur_fft) * |
(*((struct_matrice *) (*s_objet_argument).objet)) |
((size_t) (*((struct_matrice *) (*s_objet_argument).objet)) |
.nombre_lignes * sizeof(struct_complexe16))) == NULL) |
.nombre_lignes) * sizeof(struct_complexe16))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 671 instruction_ifft(struct_processus *s_eta
|
Line 654 instruction_ifft(struct_processus *s_eta
|
} |
} |
} |
} |
|
|
nombre_lignes = (*((struct_matrice *) (*s_objet_argument).objet)) |
nombre_lignes = (integer4) (*((struct_matrice *) |
.nombre_lignes; |
(*s_objet_argument).objet)).nombre_lignes; |
nombre_colonnes = longueur_fft; |
nombre_colonnes = (integer4) longueur_fft; |
inverse = -1; |
inverse = -1; |
|
|
dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); |
dft(matrice_f77, &nombre_lignes, &nombre_colonnes, &inverse, &erreur); |
Line 700 instruction_ifft(struct_processus *s_eta
|
Line 683 instruction_ifft(struct_processus *s_eta
|
longueur_fft; |
longueur_fft; |
|
|
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
if (((*((struct_matrice *) (*s_objet_resultat).objet)).tableau = |
malloc((*((struct_matrice *) (*s_objet_resultat).objet)) |
malloc(((size_t) (*((struct_matrice *) (*s_objet_resultat) |
.nombre_lignes * sizeof(struct_complexe16 *))) == NULL) |
.objet)).nombre_lignes) * sizeof(struct_complexe16 *))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
Line 712 instruction_ifft(struct_processus *s_eta
|
Line 695 instruction_ifft(struct_processus *s_eta
|
{ |
{ |
if ((((struct_complexe16 **) (*((struct_matrice *) |
if ((((struct_complexe16 **) (*((struct_matrice *) |
(*s_objet_resultat).objet)).tableau)[i] = |
(*s_objet_resultat).objet)).tableau)[i] = |
malloc((*((struct_matrice *) |
malloc(((size_t) (*((struct_matrice *) |
(*s_objet_resultat).objet)).nombre_colonnes * |
(*s_objet_resultat).objet)).nombre_colonnes) * |
sizeof(struct_complexe16))) == NULL) |
sizeof(struct_complexe16))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 782 instruction_input(struct_processus *s_et
|
Line 765 instruction_input(struct_processus *s_et
|
{ |
{ |
struct_objet *s_objet_resultat; |
struct_objet *s_objet_resultat; |
|
|
|
unsigned char *ptr_e; |
|
unsigned char *ptr_l; |
unsigned char *tampon; |
unsigned char *tampon; |
|
unsigned char *tampon2; |
|
|
|
integer8 i; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
Line 824 instruction_input(struct_processus *s_et
|
Line 812 instruction_input(struct_processus *s_et
|
} |
} |
|
|
flockfile(stdin); |
flockfile(stdin); |
|
|
(*s_objet_resultat).objet = (void *) readline(""); |
(*s_objet_resultat).objet = (void *) readline(""); |
funlockfile(stdin); |
funlockfile(stdin); |
|
|
Line 848 instruction_input(struct_processus *s_et
|
Line 837 instruction_input(struct_processus *s_et
|
} |
} |
|
|
free((unsigned char *) (*s_objet_resultat).objet); |
free((unsigned char *) (*s_objet_resultat).objet); |
(*s_objet_resultat).objet = tampon; |
|
|
ptr_l = tampon; |
|
i = 0; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
if ((*ptr_l) == '\"') |
|
{ |
|
i++; |
|
} |
|
|
|
ptr_l++; |
|
} |
|
|
|
if ((tampon2 = malloc((strlen(tampon) + 1 + ((size_t) i)) * |
|
sizeof(unsigned char))) == NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return; |
|
} |
|
|
|
ptr_l = tampon; |
|
ptr_e = tampon2; |
|
|
|
while((*ptr_l) != d_code_fin_chaine) |
|
{ |
|
if ((*ptr_l) == '\"') |
|
{ |
|
(*ptr_e) = '\\'; |
|
ptr_e++; |
|
} |
|
|
|
(*ptr_e) = (*ptr_l); |
|
ptr_e++; |
|
ptr_l++; |
|
} |
|
|
|
free(tampon); |
|
(*s_objet_resultat).objet = tampon2; |
|
|
add_history((unsigned char *) (*s_objet_resultat).objet); |
add_history((unsigned char *) (*s_objet_resultat).objet); |
stifle_history(ds_longueur_historique); |
stifle_history(ds_longueur_historique); |
Line 1040 instruction_int(struct_processus *s_etat
|
Line 1067 instruction_int(struct_processus *s_etat
|
printf("(numerical)\n\n"); |
printf("(numerical)\n\n"); |
} |
} |
|
|
// Entier et réel |
printf(" 3: %s, %s, %s, %s, %s\n", d_INT, d_REL, |
printf(" 3: %s, %s, %s\n", d_NOM, d_ALG, d_RPN); |
d_NOM, d_ALG, d_RPN); |
printf(" 2: %s\n", d_LST); |
printf(" 2: %s\n", d_LST); |
printf(" 1: %s, %s\n", d_INT, d_REL); |
printf(" 1: %s, %s\n", d_INT, d_REL); |
printf("-> 2: %s, %s\n", d_INT, d_REL); |
printf("-> 2: %s, %s\n", d_INT, d_REL); |
printf(" 1: %s, %s\n\n", d_INT, d_REL); |
printf(" 1: %s, %s\n\n", d_INT, d_REL); |
|
|
printf(" 2: %s, %s\n", d_ALG, d_NOM); |
printf(" 2: %s, %s, %s, %s\n", d_INT, d_REL, d_NOM, d_ALG); |
printf(" 1: %s\n", d_NOM); |
printf(" 1: %s\n", d_NOM); |
printf("-> 1: %s\n", d_ALG); |
printf("-> 1: %s, %s, %s, %s\n", d_INT, d_REL, d_NOM, d_ALG); |
return; |
return; |
} |
} |
else if ((*s_etat_processus).test_instruction == 'Y') |
else if ((*s_etat_processus).test_instruction == 'Y') |
Line 1070 instruction_int(struct_processus *s_etat
|
Line 1097 instruction_int(struct_processus *s_etat
|
|
|
if (test_cfsf(s_etat_processus, 31) == d_vrai) |
if (test_cfsf(s_etat_processus, 31) == d_vrai) |
{ |
{ |
if (empilement_pile_last(s_etat_processus, 3) == d_erreur) |
if (empilement_pile_last(s_etat_processus, 2) == d_erreur) |
{ |
{ |
return; |
return; |
} |
} |
Line 1094 instruction_int(struct_processus *s_etat
|
Line 1121 instruction_int(struct_processus *s_etat
|
|
|
if (((*s_objet_argument_1).type == NOM) && |
if (((*s_objet_argument_1).type == NOM) && |
(((*s_objet_argument_2).type == NOM) || |
(((*s_objet_argument_2).type == NOM) || |
((*s_objet_argument_2).type == ALG))) |
((*s_objet_argument_2).type == ALG) || |
|
((*s_objet_argument_2).type == REL) || |
|
((*s_objet_argument_2).type == INT))) |
{ |
{ |
if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
if (empilement(s_etat_processus, &((*s_etat_processus).l_base_pile), |
s_objet_argument_2) == d_erreur) |
s_objet_argument_2) == d_erreur) |
Line 1158 instruction_int(struct_processus *s_etat
|
Line 1187 instruction_int(struct_processus *s_etat
|
return; |
return; |
} |
} |
|
|
|
if (((*s_objet_argument_3).type != NOM) && |
|
((*s_objet_argument_3).type != ALG) && |
|
((*s_objet_argument_3).type != RPN) && |
|
((*s_objet_argument_3).type != REL) && |
|
((*s_objet_argument_3).type != INT)) |
|
{ |
|
liberation(s_etat_processus, s_objet_argument_1); |
|
liberation(s_etat_processus, s_objet_argument_2); |
|
liberation(s_etat_processus, s_objet_argument_3); |
|
|
|
(*s_etat_processus).erreur_execution = d_ex_erreur_type_argument; |
|
return; |
|
} |
|
|
if ((*s_objet_argument_1).type == INT) |
if ((*s_objet_argument_1).type == INT) |
{ |
{ |
precision = (*((integer8 *) (*s_objet_argument_1).objet)); |
precision = (real8) (*((integer8 *) (*s_objet_argument_1).objet)); |
} |
} |
else if ((*s_objet_argument_1).type == REL) |
else if ((*s_objet_argument_1).type == REL) |
{ |
{ |
Line 1474 instruction_incr(struct_processus *s_eta
|
Line 1517 instruction_incr(struct_processus *s_eta
|
|
|
if ((*(*s_etat_processus).pointeur_variable_courante).objet == NULL) |
if ((*(*s_etat_processus).pointeur_variable_courante).objet == 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) == d_faux) |
.pointeur_variable_courante).origine) == 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 1495 instruction_incr(struct_processus *s_eta
|
Line 1531 instruction_incr(struct_processus *s_eta
|
} |
} |
|
|
s_objet_argument = (*(*s_etat_processus) |
s_objet_argument = (*(*s_etat_processus) |
.s_liste_variables_partagees).table |
.pointeur_variable_partagee_courante).objet; |
[(*(*s_etat_processus).s_liste_variables_partagees) |
|
.position_variable].objet; |
|
variable_partagee = d_vrai; |
variable_partagee = d_vrai; |
} |
} |
else |
else |
Line 1513 instruction_incr(struct_processus *s_eta
|
Line 1547 instruction_incr(struct_processus *s_eta
|
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 1529 instruction_incr(struct_processus *s_eta
|
Line 1563 instruction_incr(struct_processus *s_eta
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
(*(*s_etat_processus).pointeur_variable_courante).objet = NULL; |
(*(*s_etat_processus).pointeur_variable_courante).objet = NULL; |
(*(*s_etat_processus) |
(*(*s_etat_processus).pointeur_variable_partagee_courante).objet = |
.s_liste_variables_partagees).table |
s_copie_argument; |
[(*(*s_etat_processus).s_liste_variables_partagees) |
|
.position_variable].objet = s_copie_argument; |
|
} |
} |
else |
else |
{ |
{ |
Line 1547 instruction_incr(struct_processus *s_eta
|
Line 1579 instruction_incr(struct_processus *s_eta
|
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 1559 instruction_incr(struct_processus *s_eta
|
Line 1591 instruction_incr(struct_processus *s_eta
|
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; |