version 1.53, 2013/06/21 14:15:55
|
version 1.77, 2019/02/12 14:38:43
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.15 |
RPL/2 (R) version 4.1.31 |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
Copyright (C) 1989-2019 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 316 instruction_recv(struct_processus *s_eta
|
Line 316 instruction_recv(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
if (pthread_mutex_lock(&((*(*((struct_processus_fils *) |
if (pthread_mutex_lock(&((*(*((struct_processus_fils *) |
(*(*l_element_courant).donnee).objet)).thread).mutex)) != 0) |
(*(*l_element_courant).donnee).objet)).thread).mutex)) != 0) |
{ |
{ |
Line 346 instruction_recv(struct_processus *s_eta
|
Line 333 instruction_recv(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
|
if (pthread_mutex_lock(&mutex_sigaction) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
action.sa_handler = SIG_IGN; |
action.sa_handler = SIG_IGN; |
action.sa_flags = SA_ONSTACK; |
action.sa_flags = 0; |
|
|
if (sigaction(SIGPIPE, &action, ®istre) != 0) |
if (sigaction(SIGPIPE, &action, ®istre) != 0) |
{ |
{ |
Line 370 instruction_recv(struct_processus *s_eta
|
Line 363 instruction_recv(struct_processus *s_eta
|
profilage(s_etat_processus, NULL); |
profilage(s_etat_processus, NULL); |
} |
} |
|
|
|
pthread_mutex_unlock(&mutex_sigaction); |
(*s_etat_processus).erreur_systeme = d_es_signal; |
(*s_etat_processus).erreur_systeme = d_es_signal; |
return; |
return; |
} |
} |
|
|
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
while((longueur_ecriture = write_atomic(s_etat_processus, |
while((longueur_ecriture = write_atomic(s_etat_processus, |
(*(*((struct_processus_fils *) (*(*l_element_courant) |
(*(*((struct_processus_fils *) (*(*l_element_courant) |
.donnee).objet)).thread).pipe_nombre_injections[1], "+", |
.donnee).objet)).thread).pipe_nombre_injections[1], "+", |
Line 404 instruction_recv(struct_processus *s_eta
|
Line 388 instruction_recv(struct_processus *s_eta
|
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
|
pthread_mutex_unlock(&mutex_sigaction); |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
Line 433 instruction_recv(struct_processus *s_eta
|
Line 418 instruction_recv(struct_processus *s_eta
|
return; |
return; |
} |
} |
|
|
|
if (pthread_mutex_unlock(&mutex_sigaction) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) |
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) |
!= 0) |
!= 0) |
{ |
{ |
Line 1352 instruction_rdgn(struct_processus *s_eta
|
Line 1343 instruction_rdgn(struct_processus *s_eta
|
|
|
if ((*s_objet_argument).type == CHN) |
if ((*s_objet_argument).type == CHN) |
{ |
{ |
if ((requete = conversion_majuscule((unsigned char *) |
if ((requete = conversion_majuscule(s_etat_processus, (unsigned char *) |
(*s_objet_argument).objet)) == NULL) |
(*s_objet_argument).objet)) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
Line 1388 instruction_rdgn(struct_processus *s_eta
|
Line 1379 instruction_rdgn(struct_processus *s_eta
|
else |
else |
{ |
{ |
if (((*s_objet_resultat).objet = conversion_majuscule( |
if (((*s_objet_resultat).objet = conversion_majuscule( |
(unsigned char *) gsl_rng_name( |
s_etat_processus, (unsigned char *) gsl_rng_name( |
(*s_etat_processus).generateur_aleatoire))) == NULL) |
(*s_etat_processus).generateur_aleatoire))) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = |
(*s_etat_processus).erreur_systeme = |
Line 1642 instruction_recode(struct_processus *s_e
|
Line 1633 instruction_recode(struct_processus *s_e
|
((*s_objet_argument_2).type == CHN) && |
((*s_objet_argument_2).type == CHN) && |
((*s_objet_argument_3).type == CHN)) |
((*s_objet_argument_3).type == CHN)) |
{ |
{ |
if ((encodage_source = conversion_majuscule((unsigned char *) |
if ((encodage_source = conversion_majuscule(s_etat_processus, |
(*s_objet_argument_2).objet)) == NULL) |
(unsigned char *) (*s_objet_argument_2).objet)) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |
} |
} |
|
|
if ((encodage_destination = conversion_majuscule((unsigned char *) |
if ((encodage_destination = conversion_majuscule(s_etat_processus, |
(*s_objet_argument_1).objet)) == NULL) |
(unsigned char *) (*s_objet_argument_1).objet)) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |