Diff for /rpl/src/instructions_s10.c between versions 1.49 and 1.54

version 1.49, 2011/09/26 15:57:15 version 1.54, 2012/01/17 14:44:10
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.4    RPL/2 (R) version 4.1.6
   Copyright (C) 1989-2011 Dr. BERTRAND Joël    Copyright (C) 1989-2012 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 45  instruction_spawn(struct_processus *s_et Line 45  instruction_spawn(struct_processus *s_et
   
     pthread_mutexattr_t         attributs_mutex;      pthread_mutexattr_t         attributs_mutex;
   
     pthread_t                   thread_id;  
     pthread_t                   thread_surveillance;      pthread_t                   thread_surveillance;
   
     struct_descripteur_thread   *s_argument_thread;      struct_descripteur_thread   *s_argument_thread;
Line 353  instruction_spawn(struct_processus *s_et Line 352  instruction_spawn(struct_processus *s_et
         return;          return;
     }      }
   
 #   ifndef OS2  #   ifdef SCHED_OTHER
 #   ifndef Cygwin  
     if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0)      if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
   #   endif
   
   #   ifdef PTHREAD_EXPLICIT_SCHED
     if (pthread_attr_setinheritsched(&attributs, PTHREAD_EXPLICIT_SCHED) != 0)      if (pthread_attr_setinheritsched(&attributs, PTHREAD_EXPLICIT_SCHED) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
   #   endif
   
   #   ifdef PTHREAD_SCOPE_SYSTEM
     if (pthread_attr_setscope(&attributs, PTHREAD_SCOPE_SYSTEM) != 0)      if (pthread_attr_setscope(&attributs, PTHREAD_SCOPE_SYSTEM) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
 #   endif  #   endif
 #   endif  
   
     /*      /*
      * Création de l'objet à retourner       * Création de l'objet à retourner
Line 413  instruction_spawn(struct_processus *s_et Line 414  instruction_spawn(struct_processus *s_et
   
     (*s_argument_thread).thread_actif = d_faux;      (*s_argument_thread).thread_actif = d_faux;
   
     if (pthread_create(&thread_id, &attributs, lancement_thread,      if (pthread_create(&(*s_nouvel_etat_processus).tid,
             s_argument_thread) != 0)              &attributs, lancement_thread, s_argument_thread) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
Line 449  instruction_spawn(struct_processus *s_et Line 450  instruction_spawn(struct_processus *s_et
         return;          return;
     }      }
   
 #   ifndef OS2  #   ifdef SCHED_OTHER
 #   ifndef Cygwin  
     if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0)      if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
   #   endif
   
   #   ifdef PTHREAD_EXPLICIT_SCHED
     if (pthread_attr_setinheritsched(&attributs,      if (pthread_attr_setinheritsched(&attributs,
             PTHREAD_EXPLICIT_SCHED) != 0)              PTHREAD_EXPLICIT_SCHED) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
   #   endif
   
   #   ifdef PTHREAD_SCOPE_SYSTEM
     if (pthread_attr_setscope(&attributs, PTHREAD_SCOPE_SYSTEM) != 0)      if (pthread_attr_setscope(&attributs, PTHREAD_SCOPE_SYSTEM) != 0)
     {      {
         (*s_etat_processus).erreur_systeme = d_es_processus;          (*s_etat_processus).erreur_systeme = d_es_processus;
         return;          return;
     }      }
 #   endif  #   endif
 #   endif  
   
     /*      /*
      * On copie l'objet plutôt que le pointeur car cet objet peut être       * On copie l'objet plutôt que le pointeur car cet objet peut être

Removed from v.1.49  
changed lines
  Added in v.1.54


CVSweb interface <joel.bertrand@systella.fr>