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

version 1.9, 2010/04/21 13:45:50 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)
         {          {
             printf("[%d] SIGFSTOP (thread %llu)\n", (int) getpid(),              if (signal == SIGFSTOP)
                     (unsigned long long) pthread_self());              {
             fflush(stdout);                  printf("[%d] SIGFSTOP (thread %llu)\n", (int) getpid(),
                           (unsigned long long) pthread_self());
                   fflush(stdout);
               }
               else
               {
                   printf("[%d] SIGFABORT (thread %llu)\n", (int) getpid(),
                           (unsigned long long) pthread_self());
                   fflush(stdout);
               }
         }          }
   
         /*          /*
Line 1982  interruption5(int signal, siginfo_t *sig Line 2014  interruption5(int signal, siginfo_t *sig
     }      }
     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)
         {          {
             pthread_kill(thread, SIGFSTOP);              pthread_kill(thread, signal);
             deverrouillage_gestionnaire_signaux();              deverrouillage_gestionnaire_signaux();
             return;              return;
         }          }
Line 2110  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.9  
changed lines
  Added in v.1.12


CVSweb interface <joel.bertrand@systella.fr>