Diff for /rpl/src/gestion_objets.c between versions 1.65 and 1.66

version 1.65, 2011/09/10 20:45:06 version 1.66, 2011/09/14 14:34:28
Line 772  liberation(struct_processus *s_etat_proc Line 772  liberation(struct_processus *s_etat_proc
 {  {
     logical1                            drapeau;      logical1                            drapeau;
   
     sigset_t                            oldset;  
     sigset_t                            set;  
   
     struct_liste_chainee                *l_element_courant;      struct_liste_chainee                *l_element_courant;
     struct_liste_chainee                *l_element_suivant;      struct_liste_chainee                *l_element_suivant;
   
Line 1144  liberation(struct_processus *s_etat_proc Line 1141  liberation(struct_processus *s_etat_proc
   
         case PRC :          case PRC :
         {          {
             sigfillset(&set);  
             pthread_sigmask(SIG_BLOCK, &set, &oldset);  
   
             if (pthread_mutex_lock(&((*(*((struct_processus_fils *)              if (pthread_mutex_lock(&((*(*((struct_processus_fils *)
                     (*s_objet).objet)).thread).mutex_nombre_references)) != 0)                      (*s_objet).objet)).thread).mutex_nombre_references)) != 0)
             {              {
                 pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
                 sigpending(&set);  
   
                 (*s_etat_processus).erreur_systeme = d_es_processus;                  (*s_etat_processus).erreur_systeme = d_es_processus;
                 return;                  return;
             }              }
Line 1180  liberation(struct_processus *s_etat_proc Line 1171  liberation(struct_processus *s_etat_proc
             if (pthread_mutex_unlock(&((*(*((struct_processus_fils *)              if (pthread_mutex_unlock(&((*(*((struct_processus_fils *)
                     (*s_objet).objet)).thread).mutex_nombre_references)) != 0)                      (*s_objet).objet)).thread).mutex_nombre_references)) != 0)
             {              {
                 pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
                 sigpending(&set);  
   
                 (*s_etat_processus).erreur_systeme = d_es_processus;                  (*s_etat_processus).erreur_systeme = d_es_processus;
                 return;                  return;
             }              }
   
             pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
             sigpending(&set);  
   
             if (drapeau == d_vrai)              if (drapeau == d_vrai)
             {              {
                 pthread_mutex_destroy(&((*(*((struct_processus_fils *)                  pthread_mutex_destroy(&((*(*((struct_processus_fils *)
Line 1527  struct_objet * Line 1512  struct_objet *
 copie_objet(struct_processus *s_etat_processus,  copie_objet(struct_processus *s_etat_processus,
         struct_objet *s_objet, unsigned char type)          struct_objet *s_objet, unsigned char type)
 {  {
     sigset_t                    oldset;  
     sigset_t                    set;  
   
     struct_liste_chainee        *l_element_base;      struct_liste_chainee        *l_element_base;
     struct_liste_chainee        *l_element_courant;      struct_liste_chainee        *l_element_courant;
     struct_liste_chainee        *l_element_courant_ecriture;      struct_liste_chainee        *l_element_courant_ecriture;
Line 2300  copie_objet(struct_processus *s_etat_pro Line 2282  copie_objet(struct_processus *s_etat_pro
   
         case PRC :          case PRC :
         {          {
             sigfillset(&set);  
             pthread_sigmask(SIG_BLOCK, &set, &oldset);  
   
             if (pthread_mutex_lock(&((*(*((struct_processus_fils *)              if (pthread_mutex_lock(&((*(*((struct_processus_fils *)
                     (*s_objet).objet)).thread).mutex_nombre_references)) != 0)                      (*s_objet).objet)).thread).mutex_nombre_references)) != 0)
             {              {
                 pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
                 sigpending(&set);  
   
                 return(NULL);                  return(NULL);
             }              }
   
Line 2318  copie_objet(struct_processus *s_etat_pro Line 2294  copie_objet(struct_processus *s_etat_pro
             if (pthread_mutex_unlock(&((*(*((struct_processus_fils *)              if (pthread_mutex_unlock(&((*(*((struct_processus_fils *)
                     (*s_objet).objet)).thread).mutex_nombre_references)) != 0)                      (*s_objet).objet)).thread).mutex_nombre_references)) != 0)
             {              {
                 pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
                 sigpending(&set);  
   
                 return(NULL);                  return(NULL);
             }              }
   
             pthread_sigmask(SIG_SETMASK, &oldset, NULL);  
             sigpending(&set);  
   
             if (type != 'O')              if (type != 'O')
             {              {
                 incrementation_atomique(s_objet);                  incrementation_atomique(s_objet);
Line 3302  copie_etat_processus(struct_processus *s Line 3272  copie_etat_processus(struct_processus *s
      * Copie des différents contextes       * Copie des différents contextes
      */       */
   
     (*s_nouvel_etat_processus).signal_a_traiter = d_faux;      (*s_nouvel_etat_processus).pointeur_signal_lecture = d_faux;
       (*s_nouvel_etat_processus).pointeur_signal_ecriture = d_faux;
   
     (*s_nouvel_etat_processus).l_base_pile_contextes = NULL;      (*s_nouvel_etat_processus).l_base_pile_contextes = NULL;
     l_element_lecture = (*s_etat_processus).l_base_pile_contextes;      l_element_lecture = (*s_etat_processus).l_base_pile_contextes;
   
Line 3979  debug_fork() Line 3951  debug_fork()
   
     if (pid == 0)      if (pid == 0)
     {      {
 #       ifdef _BROKEN_SIGINFO          liberation_queue_signaux(s_etat_processus);
         liberation_fifos_signaux(s_etat_processus);          creation_queue_signaux(s_etat_processus);
         creation_fifos_signaux(s_etat_processus);  
 #       endif  
   
         pthread_mutex_destroy(&mutex_allocation);          pthread_mutex_destroy(&mutex_allocation);
         debug_memoire_initialisation();          debug_memoire_initialisation();

Removed from v.1.65  
changed lines
  Added in v.1.66


CVSweb interface <joel.bertrand@systella.fr>