Diff for /rpl/src/interruptions.c between versions 1.10 and 1.12

version 1.10, 2010/04/28 11:05:45 version 1.12, 2010/04/29 15:47:25
Line 394  retrait_thread_surveillance(struct_proce Line 394  retrait_thread_surveillance(struct_proce
   
     if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0)      if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0)
     {      {
   #       ifndef SEMAPHORES_NOMMES
           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 411  retrait_thread_surveillance(struct_proce Line 416  retrait_thread_surveillance(struct_proce
     {      {
         if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)          if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)
         {          {
   #           ifndef SEMAPHORES_NOMMES
               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 425  retrait_thread_surveillance(struct_proce Line 435  retrait_thread_surveillance(struct_proce
     {      {
         if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)          if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)
         {          {
   #           ifndef SEMAPHORES_NOMMES
               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 1291  liberation_threads(struct_processus *s_e Line 1306  liberation_threads(struct_processus *s_e
         if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0)          if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0)
         {          {
             (*s_etat_processus).erreur_systeme = d_es_processus;              (*s_etat_processus).erreur_systeme = d_es_processus;
               sem_post(&semaphore_liste_threads);
             return;              return;
         }          }
   
Line 1305  liberation_threads(struct_processus *s_e Line 1321  liberation_threads(struct_processus *s_e
             if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)              if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_processus;                  (*s_etat_processus).erreur_systeme = d_es_processus;
                   sem_post(&semaphore_liste_threads);
                 return;                  return;
             }              }
   
Line 1316  liberation_threads(struct_processus *s_e Line 1333  liberation_threads(struct_processus *s_e
             if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)              if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0)
             {              {
                 (*s_etat_processus).erreur_systeme = d_es_processus;                  (*s_etat_processus).erreur_systeme = d_es_processus;
                   sem_post(&semaphore_liste_threads);
                 return;                  return;
             }              }
         }          }
Line 1957  interruption5(int signal, siginfo_t *sig Line 1975  interruption5(int signal, siginfo_t *sig
             return;              return;
         }          }
   
           if (signal == SIGFABORT)
           {
               (*s_etat_processus).arret_depuis_abort = -1;
           }
   
         if (((*s_etat_processus).type_debug & d_debug_signaux) != 0)          if (((*s_etat_processus).type_debug & d_debug_signaux) != 0)
         {          {
             if (signal == SIGFSTOP)              if (signal == SIGFSTOP)
Line 1980  interruption5(int signal, siginfo_t *sig Line 2003  interruption5(int signal, siginfo_t *sig
          * -1 -> traitement retardé (un ou plusieurs signaux stop reçus)           * -1 -> traitement retardé (un ou plusieurs signaux stop reçus)
          */           */
   
         if (signal == SIGFSTOP)          if ((*s_etat_processus).var_volatile_traitement_retarde_stop == 0)
         {          {
             if ((*s_etat_processus).var_volatile_traitement_retarde_stop == 0)              (*s_etat_processus).var_volatile_requete_arret = -1;
             {  
                 (*s_etat_processus).var_volatile_requete_arret = -1;  
             }  
             else  
             {  
                 (*s_etat_processus).var_volatile_traitement_retarde_stop = -1;  
             }  
         }          }
         else          else
         {          {
             (*s_etat_processus).var_volatile_requete_arret = -1;              (*s_etat_processus).var_volatile_traitement_retarde_stop = -1;
             (*s_etat_processus).arret_depuis_abort = -1;  
         }          }
     }      }
     else      else
     {      {
           if ((s_etat_processus = recherche_thread(getpid(), pthread_self()))
                   == NULL)
           {
               deverrouillage_gestionnaire_signaux();
               return;
           }
   
           if (signal == SIGFABORT)
           {
               (*s_etat_processus).arret_depuis_abort = -1;
           }
   
         // Envoi d'un signal au thread maître du groupe.          // Envoi d'un signal au thread maître du groupe.
   
         if (recherche_thread_principal(getpid(), &thread) == d_vrai)          if (recherche_thread_principal(getpid(), &thread) == d_vrai)
Line 2127  interruption9(int signal, siginfo_t *sig Line 2154  interruption9(int signal, siginfo_t *sig
         fflush(stdout);          fflush(stdout);
     }      }
   
     pthread_kill((*s_etat_processus).tid_processus_pere, SIGFSTOP);      pthread_kill((*s_etat_processus).tid_processus_pere, SIGFABORT);
     deverrouillage_gestionnaire_signaux();      deverrouillage_gestionnaire_signaux();
     return;      return;
 }  }

Removed from v.1.10  
changed lines
  Added in v.1.12


CVSweb interface <joel.bertrand@systella.fr>