version 1.130, 2015/07/21 12:22:15
|
version 1.135, 2015/10/23 09:58:50
|
Line 1
|
Line 1
|
#define DEBUG_RETURN |
|
#define DEBUG_ERREURS |
|
|
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.22 |
RPL/2 (R) version 4.1.23 |
Copyright (C) 1989-2015 Dr. BERTRAND Joël |
Copyright (C) 1989-2015 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 1091 instruction_detach(struct_processus *s_e
|
Line 1088 instruction_detach(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
|
if (pthread_mutex_lock(&mutex_liste_variables_partagees) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if (pthread_mutex_lock(&((*s_etat_processus).mutex_allocation_buffer)) != 0) |
if (pthread_mutex_lock(&((*s_etat_processus).mutex_allocation_buffer)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
Line 1135 instruction_detach(struct_processus *s_e
|
Line 1138 instruction_detach(struct_processus *s_e
|
* Processus père |
* Processus père |
*/ |
*/ |
|
|
|
if (pthread_mutex_unlock(&mutex_liste_variables_partagees) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
if (variable_partagee == d_vrai) |
if (variable_partagee == d_vrai) |
{ |
{ |
liberation(s_etat_processus, s_copie); |
liberation(s_etat_processus, s_copie); |
Line 1272 instruction_detach(struct_processus *s_e
|
Line 1281 instruction_detach(struct_processus *s_e
|
* Processus fils |
* Processus fils |
*/ |
*/ |
|
|
|
pthread_mutex_destroy(&mutex_liste_variables_partagees); |
|
|
|
pthread_mutexattr_init(&attributs_mutex); |
|
pthread_mutexattr_settype(&attributs_mutex, PTHREAD_MUTEX_RECURSIVE); |
|
pthread_mutex_init(&mutex_liste_variables_partagees, &attributs_mutex); |
|
pthread_mutexattr_destroy(&attributs_mutex); |
|
|
liberation_queue_signaux(s_etat_processus); |
liberation_queue_signaux(s_etat_processus); |
creation_queue_signaux(s_etat_processus); |
creation_queue_signaux(s_etat_processus); |
|
|