--- rpl/src/gestion_objets.c 2010/09/11 16:46:19 1.40 +++ rpl/src/gestion_objets.c 2010/09/14 16:21:21 1.41 @@ -758,6 +758,9 @@ liberation(struct_processus *s_etat_proc { logical1 drapeau; + sigset_t oldset; + sigset_t set; + struct_liste_chainee *l_element_courant; struct_liste_chainee *l_element_suivant; @@ -1127,9 +1130,15 @@ liberation(struct_processus *s_etat_proc case PRC : { + sigfillset(&set); + pthread_sigmask(SIG_BLOCK, &set, &oldset); + if (pthread_mutex_lock(&((*(*((struct_processus_fils *) (*s_objet).objet)).thread).mutex_nombre_references)) != 0) { + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + (*s_etat_processus).erreur_systeme = d_es_processus; return; } @@ -1157,10 +1166,16 @@ liberation(struct_processus *s_etat_proc if (pthread_mutex_unlock(&((*(*((struct_processus_fils *) (*s_objet).objet)).thread).mutex_nombre_references)) != 0) { + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + (*s_etat_processus).erreur_systeme = d_es_processus; return; } + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + if (drapeau == d_vrai) { pthread_mutex_destroy(&((*(*((struct_processus_fils *) @@ -1498,6 +1513,9 @@ struct_objet * copie_objet(struct_processus *s_etat_processus, struct_objet *s_objet, unsigned char type) { + sigset_t oldset; + sigset_t set; + struct_liste_chainee *l_element_base; struct_liste_chainee *l_element_courant; struct_liste_chainee *l_element_courant_ecriture; @@ -2268,9 +2286,15 @@ copie_objet(struct_processus *s_etat_pro case PRC : { + sigfillset(&set); + pthread_sigmask(SIG_BLOCK, &set, &oldset); + if (pthread_mutex_lock(&((*(*((struct_processus_fils *) (*s_objet).objet)).thread).mutex_nombre_references)) != 0) { + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + return(NULL); } @@ -2280,9 +2304,15 @@ copie_objet(struct_processus *s_etat_pro if (pthread_mutex_unlock(&((*(*((struct_processus_fils *) (*s_objet).objet)).thread).mutex_nombre_references)) != 0) { + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + return(NULL); } + pthread_sigmask(SIG_SETMASK, &oldset, NULL); + sigpending(&set); + if (type != 'O') { incrementation_atomique(s_objet);