Diff for /rpl/src/fusible.c between versions 1.2 and 1.33

version 1.2, 2010/01/27 22:22:10 version 1.33, 2011/09/26 15:57:10
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.10    RPL/2 (R) version 4.1.4
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2011 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 20 Line 20
 */  */
   
   
 #include "rpl.conv.h"  #include "rpl-conv.h"
   
   
 /*  /*
Line 40 Line 40
 void *  void *
 fusible(void *argument)  fusible(void *argument)
 {  {
   #   ifndef OS2
   
     real8                   temps_cpu_precedent;      real8                   temps_cpu_precedent;
     real8                   temps_cpu_courant;      real8                   temps_cpu_courant;
   
     sigset_t                masque;  
   
     struct_processus        *s_etat_processus;      struct_processus        *s_etat_processus;
   
     struct rusage           s_rusage;      struct rusage           s_rusage;
Line 53  fusible(void *argument) Line 53  fusible(void *argument)
   
     s_etat_processus = argument;      s_etat_processus = argument;
   
     sigemptyset(&masque);  
     sigaddset(&masque, SIGINJECT);  
     sigaddset(&masque, SIGFSTOP);  
     sigaddset(&masque, SIGURG);  
     sigaddset(&masque, SIGALRM);  
     sigaddset(&masque, SIGCONT);  
     sigaddset(&masque, SIGINT);  
     pthread_sigmask(SIG_BLOCK, &masque, NULL);  
   
     if ((*s_etat_processus).debug == d_vrai)      if ((*s_etat_processus).debug == d_vrai)
         if (((*s_etat_processus).type_debug &          if (((*s_etat_processus).type_debug &
                 d_debug_fusible) != 0)                  d_debug_fusible) != 0)
Line 94  fusible(void *argument) Line 85  fusible(void *argument)
     {      {
         pthread_testcancel();          pthread_testcancel();
         nanosleep(&temporisation, NULL);          nanosleep(&temporisation, NULL);
   
         getrusage(RUSAGE_SELF, &s_rusage);          getrusage(RUSAGE_SELF, &s_rusage);
   
         temps_cpu_precedent = temps_cpu_courant;          temps_cpu_precedent = temps_cpu_courant;
Line 108  fusible(void *argument) Line 98  fusible(void *argument)
         {          {
             (*s_etat_processus).temps_maximal_cpu = 0;              (*s_etat_processus).temps_maximal_cpu = 0;
   
             pthread_kill((*s_etat_processus).thread_surveille_par_fusible,              envoi_signal_thread((*s_etat_processus)
                     SIGFSTOP);                      .thread_surveille_par_fusible, rpl_sigstop);
             break;              break;
         }          }
     } while((*s_etat_processus).var_volatile_requete_arret == 0);      } while((*s_etat_processus).var_volatile_requete_arret == 0);
Line 131  fusible(void *argument) Line 121  fusible(void *argument)
         fflush(stdout);          fflush(stdout);
     }      }
   
   #   else
   
       struct_processus        *s_etat_processus;
   
       s_etat_processus = argument;
   
       if ((*s_etat_processus).langue == 'F')
       {
           printf("+++Attention : Support indisponible sous OS/2\n");
       }
       else
       {
           printf("+++Warning : Function unavailable\n");
       }
   #   endif
   
     pthread_exit(NULL);      pthread_exit(NULL);
 }  }
   

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


CVSweb interface <joel.bertrand@systella.fr>