Diff for /rpl/src/gestion_objets.c between versions 1.40 and 1.41

version 1.40, 2010/09/11 16:46:19 version 1.41, 2010/09/14 16:21:21
Line 758  liberation(struct_processus *s_etat_proc Line 758  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 1127  liberation(struct_processus *s_etat_proc Line 1130  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 1157  liberation(struct_processus *s_etat_proc Line 1166  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 1498  struct_objet * Line 1513  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 2268  copie_objet(struct_processus *s_etat_pro Line 2286  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 2280  copie_objet(struct_processus *s_etat_pro Line 2304  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);

Removed from v.1.40  
changed lines
  Added in v.1.41


CVSweb interface <joel.bertrand@systella.fr>