Diff for /rpl/src/interruptions.c between versions 1.2 and 1.9

version 1.2, 2010/01/27 22:22:17 version 1.9, 2010/04/21 13:45:50
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.10    RPL/2 (R) version 4.0.15
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2010 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 82  insertion_thread(struct_processus *s_eta Line 82  insertion_thread(struct_processus *s_eta
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 97  insertion_thread(struct_processus *s_eta Line 101  insertion_thread(struct_processus *s_eta
     if ((l_nouvel_objet = malloc(sizeof(struct_liste_chainee_volatile)))      if ((l_nouvel_objet = malloc(sizeof(struct_liste_chainee_volatile)))
             == NULL)              == NULL)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
   
Line 109  insertion_thread(struct_processus *s_eta Line 117  insertion_thread(struct_processus *s_eta
   
     if (((*l_nouvel_objet).donnee = malloc(sizeof(struct_thread))) == NULL)      if (((*l_nouvel_objet).donnee = malloc(sizeof(struct_thread))) == NULL)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
   
Line 126  insertion_thread(struct_processus *s_eta Line 138  insertion_thread(struct_processus *s_eta
   
     liste_threads = l_nouvel_objet;      liste_threads = l_nouvel_objet;
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
Line 152  insertion_thread_surveillance(struct_pro Line 168  insertion_thread_surveillance(struct_pro
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 167  insertion_thread_surveillance(struct_pro Line 187  insertion_thread_surveillance(struct_pro
     if ((l_nouvel_objet = malloc(sizeof(struct_liste_chainee_volatile)))      if ((l_nouvel_objet = malloc(sizeof(struct_liste_chainee_volatile)))
             == NULL)              == NULL)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
   
Line 180  insertion_thread_surveillance(struct_pro Line 204  insertion_thread_surveillance(struct_pro
   
     liste_threads_surveillance = l_nouvel_objet;      liste_threads_surveillance = l_nouvel_objet;
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
Line 206  retrait_thread(struct_processus *s_etat_ Line 234  retrait_thread(struct_processus *s_etat_
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 236  retrait_thread(struct_processus *s_etat_ Line 268  retrait_thread(struct_processus *s_etat_
   
     if (l_element_courant == NULL)      if (l_element_courant == NULL)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
   
Line 260  retrait_thread(struct_processus *s_etat_ Line 296  retrait_thread(struct_processus *s_etat_
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
   
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
         return;          return;
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
   
Line 293  retrait_thread_surveillance(struct_proce Line 337  retrait_thread_surveillance(struct_proce
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 321  retrait_thread_surveillance(struct_proce Line 369  retrait_thread_surveillance(struct_proce
   
     if (l_element_courant == NULL)      if (l_element_courant == NULL)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         sem_post(&semaphore_liste_threads);          sem_post(&semaphore_liste_threads);
   #       else
           sem_post(semaphore_liste_threads);
   #       endif
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
   
Line 381  retrait_thread_surveillance(struct_proce Line 433  retrait_thread_surveillance(struct_proce
         }          }
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         sigpending(&set);          sigpending(&set);
Line 400  verrouillage_threads_concurrents(struct_ Line 456  verrouillage_threads_concurrents(struct_
 {  {
     volatile struct_liste_chainee_volatile  *l_element_courant;      volatile struct_liste_chainee_volatile  *l_element_courant;
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 417  verrouillage_threads_concurrents(struct_ Line 477  verrouillage_threads_concurrents(struct_
                 == getpid()) && (pthread_equal((*((struct_thread *)                  == getpid()) && (pthread_equal((*((struct_thread *)
                 (*l_element_courant).donnee)).tid, pthread_self()) == 0))                  (*l_element_courant).donnee)).tid, pthread_self()) == 0))
         {          {
   #           ifndef SEMAPHORES_NOMMES
             while(sem_wait(&((*(*((struct_thread *) (*l_element_courant)              while(sem_wait(&((*(*((struct_thread *) (*l_element_courant)
                     .donnee)).s_etat_processus).semaphore_fork)) == -1)                      .donnee)).s_etat_processus).semaphore_fork)) == -1)
   #           else
               while(sem_wait((*(*((struct_thread *) (*l_element_courant)
                       .donnee)).s_etat_processus).semaphore_fork) == -1)
   #           endif
             {              {
                 if (errno != EINTR)                  if (errno != EINTR)
                 {                  {
Line 447  deverrouillage_threads_concurrents(struc Line 512  deverrouillage_threads_concurrents(struc
                 == getpid()) && (pthread_equal((*((struct_thread *)                  == getpid()) && (pthread_equal((*((struct_thread *)
                 (*l_element_courant).donnee)).tid, pthread_self()) == 0))                  (*l_element_courant).donnee)).tid, pthread_self()) == 0))
         {          {
   #           ifndef SEMAPHORES_NOMMES
             if (sem_post(&((*(*((struct_thread *)              if (sem_post(&((*(*((struct_thread *)
                     (*l_element_courant).donnee)).s_etat_processus)                      (*l_element_courant).donnee)).s_etat_processus)
                     .semaphore_fork)) != 0)                      .semaphore_fork)) != 0)
   #           else
               if (sem_post((*(*((struct_thread *)
                       (*l_element_courant).donnee)).s_etat_processus)
                       .semaphore_fork) != 0)
   #           endif
             {              {
   #               ifndef SEMAPHORES_NOMMES
                 if (sem_post(&semaphore_liste_threads) != 0)                  if (sem_post(&semaphore_liste_threads) != 0)
                 {                  {
                     (*s_etat_processus).erreur_systeme = d_es_processus;                      (*s_etat_processus).erreur_systeme = d_es_processus;
                     return;                      return;
                 }                  }
   #               else
                   if (sem_post(semaphore_liste_threads) != 0)
                   {
                       (*s_etat_processus).erreur_systeme = d_es_processus;
                       return;
                   }
   #               endif
   
                 (*s_etat_processus).erreur_systeme = d_es_processus;                  (*s_etat_processus).erreur_systeme = d_es_processus;
                 return;                  return;
Line 465  deverrouillage_threads_concurrents(struc Line 544  deverrouillage_threads_concurrents(struc
         l_element_courant = (*l_element_courant).suivant;          l_element_courant = (*l_element_courant).suivant;
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
Line 498  liberation_threads(struct_processus *s_e Line 581  liberation_threads(struct_processus *s_e
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_liste_threads) == -1)      while(sem_wait(&semaphore_liste_threads) == -1)
   #   else
       while(sem_wait(semaphore_liste_threads) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 916  liberation_threads(struct_processus *s_e Line 1003  liberation_threads(struct_processus *s_e
                 {                  {
                     if (((*((struct_descripteur_fichier *)                      if (((*((struct_descripteur_fichier *)
                             (*((struct_liste_chainee *) element_courant))                              (*((struct_liste_chainee *) element_courant))
                             .donnee)).descripteur ==  
                             (*((struct_descripteur_fichier *)  
                             (*((struct_liste_chainee *) element_candidat))  
                             .donnee)).descripteur) &&  
                             ((*((struct_descripteur_fichier *)  
                             (*((struct_liste_chainee *) element_courant))  
                             .donnee)).pid ==                              .donnee)).pid ==
                             (*((struct_descripteur_fichier *)                              (*((struct_descripteur_fichier *)
                             (*((struct_liste_chainee *) element_candidat))                              (*((struct_liste_chainee *) element_candidat))
Line 932  liberation_threads(struct_processus *s_e Line 1013  liberation_threads(struct_processus *s_e
                             (*((struct_liste_chainee *) element_candidat))                              (*((struct_liste_chainee *) element_candidat))
                             .donnee)).tid) != 0))                              .donnee)).tid) != 0))
                     {                      {
                         break;                          if ((*((struct_descripteur_fichier *)
                                   (*((struct_liste_chainee *) element_courant))
                                   .donnee)).type ==
                                   (*((struct_descripteur_fichier *)
                                   (*((struct_liste_chainee *) element_candidat))
                                   .donnee)).type)
                           {
                               if ((*((struct_descripteur_fichier *)
                                       (*((struct_liste_chainee *)
                                       element_candidat)).donnee)).type == 'C')
                               {
                                   if ((*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_courant)).donnee))
                                           .descripteur_c ==
                                           (*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_candidat)).donnee))
                                           .descripteur_c)
                                   {
                                       break;
                                   }
                               }
                               else
                               {
                                   if (((*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_courant)).donnee))
                                           .descripteur_sqlite ==
                                           (*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_candidat)).donnee))
                                           .descripteur_sqlite) &&
                                           ((*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_courant)).donnee))
                                           .descripteur_c ==
                                           (*((struct_descripteur_fichier *)
                                           (*((struct_liste_chainee *)
                                           element_candidat)).donnee))
                                           .descripteur_c))
                                   {
                                       break;
                                   }
                               }
                           }
                     }                      }
   
                     element_candidat = (*((struct_liste_chainee *)                      element_candidat = (*((struct_liste_chainee *)
Line 943  liberation_threads(struct_processus *s_e Line 1069  liberation_threads(struct_processus *s_e
                 {                  {
                     fclose((*((struct_descripteur_fichier *)                      fclose((*((struct_descripteur_fichier *)
                             (*((struct_liste_chainee *) element_courant))                              (*((struct_liste_chainee *) element_courant))
                             .donnee)).descripteur);                              .donnee)).descripteur_c);
   
                       if ((*((struct_descripteur_fichier *)
                               (*((struct_liste_chainee *) element_courant))
                               .donnee)).type != 'C')
                       {
                           sqlite3_close((*((struct_descripteur_fichier *)
                                   (*((struct_liste_chainee *) element_courant))
                                   .donnee)).descripteur_sqlite);
                       }
                 }                  }
   
                 free((*((struct_descripteur_fichier *)                  free((*((struct_descripteur_fichier *)
Line 1115  liberation_threads(struct_processus *s_e Line 1250  liberation_threads(struct_processus *s_e
   
             liberation_allocateur(s_etat_processus);              liberation_allocateur(s_etat_processus);
   
   #           ifndef SEMAPHORES_NOMMES
             sem_post(&((*s_etat_processus).semaphore_fork));              sem_post(&((*s_etat_processus).semaphore_fork));
             sem_destroy(&((*s_etat_processus).semaphore_fork));              sem_destroy(&((*s_etat_processus).semaphore_fork));
   #           else
               sem_post((*s_etat_processus).semaphore_fork);
               sem_destroy2((*s_etat_processus).semaphore_fork, sem_fork);
   #           endif
   
             free(s_etat_processus);              free(s_etat_processus);
   
Line 1187  liberation_threads(struct_processus *s_e Line 1327  liberation_threads(struct_processus *s_e
   
     liste_threads_surveillance = NULL;      liste_threads_surveillance = NULL;
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_liste_threads) != 0)      if (sem_post(&semaphore_liste_threads) != 0)
   #   else
       if (sem_post(semaphore_liste_threads) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
Line 1310  verrouillage_gestionnaire_signaux() Line 1454  verrouillage_gestionnaire_signaux()
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_gestionnaires_signaux_atomique) == -1)      while(sem_wait(&semaphore_gestionnaires_signaux_atomique) == -1)
   #   else
       while(sem_wait(semaphore_gestionnaires_signaux_atomique) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 1320  verrouillage_gestionnaire_signaux() Line 1468  verrouillage_gestionnaire_signaux()
         }          }
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_gestionnaires_signaux) == -1)      if (sem_post(&semaphore_gestionnaires_signaux) == -1)
   #   else
       if (sem_post(semaphore_gestionnaires_signaux) == -1)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         BUG(1, uprintf("Lock error !\n"));          BUG(1, uprintf("Lock error !\n"));
         return;          return;
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_getvalue(&semaphore_gestionnaires_signaux, &semaphore) != 0)      if (sem_getvalue(&semaphore_gestionnaires_signaux, &semaphore) != 0)
   #   else
       if (sem_getvalue(semaphore_gestionnaires_signaux, &semaphore) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         BUG(1, uprintf("Lock error !\n"));          BUG(1, uprintf("Lock error !\n"));
         return;          return;
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_gestionnaires_signaux_atomique) != 0)      if (sem_post(&semaphore_gestionnaires_signaux_atomique) != 0)
   #   else
       if (sem_post(semaphore_gestionnaires_signaux_atomique) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         BUG(1, uprintf("Unlock error !\n"));          BUG(1, uprintf("Unlock error !\n"));
Line 1349  verrouillage_gestionnaire_signaux() Line 1509  verrouillage_gestionnaire_signaux()
         // par un thread concurrent. On essaye donc de le bloquer jusqu'à          // par un thread concurrent. On essaye donc de le bloquer jusqu'à
         // ce que ce soit possible.          // ce que ce soit possible.
   
   #       ifndef SEMAPHORES_NOMMES
         while(sem_trywait(&semaphore_liste_threads) == -1)          while(sem_trywait(&semaphore_liste_threads) == -1)
   #       else
           while(sem_trywait(semaphore_liste_threads) == -1)
   #       endif
         {          {
             if ((errno != EINTR) && (errno != EAGAIN))              if ((errno != EINTR) && (errno != EAGAIN))
             {              {
Line 1393  deverrouillage_gestionnaire_signaux() Line 1557  deverrouillage_gestionnaire_signaux()
     sigfillset(&set);      sigfillset(&set);
     pthread_sigmask(SIG_BLOCK, &set, &oldset);      pthread_sigmask(SIG_BLOCK, &set, &oldset);
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_gestionnaires_signaux_atomique) == -1)      while(sem_wait(&semaphore_gestionnaires_signaux_atomique) == -1)
   #   else
       while(sem_wait(semaphore_gestionnaires_signaux_atomique) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 1403  deverrouillage_gestionnaire_signaux() Line 1571  deverrouillage_gestionnaire_signaux()
         }          }
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_getvalue(&semaphore_gestionnaires_signaux, &semaphore) != 0)      if (sem_getvalue(&semaphore_gestionnaires_signaux, &semaphore) != 0)
   #   else
       if (sem_getvalue(semaphore_gestionnaires_signaux, &semaphore) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         BUG(1, uprintf("Unlock error !\n"));          BUG(1, uprintf("Unlock error !\n"));
         return;          return;
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     while(sem_wait(&semaphore_gestionnaires_signaux) == -1)      while(sem_wait(&semaphore_gestionnaires_signaux) == -1)
   #   else
       while(sem_wait(semaphore_gestionnaires_signaux) == -1)
   #   endif
     {      {
         if (errno != EINTR)          if (errno != EINTR)
         {          {
Line 1420  deverrouillage_gestionnaire_signaux() Line 1596  deverrouillage_gestionnaire_signaux()
         }          }
     }      }
   
   #   ifndef SEMAPHORES_NOMMES
     if (sem_post(&semaphore_gestionnaires_signaux_atomique) != 0)      if (sem_post(&semaphore_gestionnaires_signaux_atomique) != 0)
   #   else
       if (sem_post(semaphore_gestionnaires_signaux_atomique) != 0)
   #   endif
     {      {
         pthread_sigmask(SIG_SETMASK, &oldset, NULL);          pthread_sigmask(SIG_SETMASK, &oldset, NULL);
         BUG(1, uprintf("Unlock error !\n"));          BUG(1, uprintf("Unlock error !\n"));
Line 1443  deverrouillage_gestionnaire_signaux() Line 1623  deverrouillage_gestionnaire_signaux()
   
     if (semaphore == 1)      if (semaphore == 1)
     {      {
   #       ifndef SEMAPHORES_NOMMES
         if (sem_post(&semaphore_liste_threads) != 0)          if (sem_post(&semaphore_liste_threads) != 0)
   #       else
           if (sem_post(semaphore_liste_threads) != 0)
   #       endif
         {          {
             pthread_sigmask(SIG_SETMASK, &oldset, NULL);              pthread_sigmask(SIG_SETMASK, &oldset, NULL);
   

Removed from v.1.2  
changed lines
  Added in v.1.9


CVSweb interface <joel.bertrand@systella.fr>