Diff for /rpl/src/rpl.h between versions 1.165 and 1.181

version 1.165, 2012/05/21 17:25:46 version 1.181, 2012/10/05 13:12:39
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.9    RPL/2 (R) version 4.1.11
   Copyright (C) 1989-2012 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 145 Line 145
         int sem_close_SysV(sem_t *sem);          int sem_close_SysV(sem_t *sem);
         int sem_wait_SysV(sem_t *sem);          int sem_wait_SysV(sem_t *sem);
         int sem_trywait_SysV(sem_t *sem);          int sem_trywait_SysV(sem_t *sem);
           int sem_timedwait_SysV(sem_t *sem, struct timespec *ts);
         int sem_post_SysV(sem_t *sem);          int sem_post_SysV(sem_t *sem);
         int sem_getvalue_SysV(sem_t *sem, int *value);          int sem_getvalue_SysV(sem_t *sem, int *value);
         int sem_unlink_SysV(const char *nom);          int sem_unlink_SysV(char *nom);
         int sem_destroy_SysV(sem_t *sem);          int sem_destroy_SysV(sem_t *sem);
 #   endif  #   endif
   
Line 342  union semun Line 343  union semun
 #   define sem_destroy(a)       sem_destroy_SysV(a)  #   define sem_destroy(a)       sem_destroy_SysV(a)
 #   define sem_wait(a)          sem_wait_SysV(a)  #   define sem_wait(a)          sem_wait_SysV(a)
 #   define sem_trywait(a)       sem_trywait_SysV(a)  #   define sem_trywait(a)       sem_trywait_SysV(a)
   #   define sem_timedwait(a, b)  sem_timedwait_SysV(a, b)
 #   define sem_post(a)          sem_post_SysV(a)  #   define sem_post(a)          sem_post_SysV(a)
 #   define sem_getvalue(a, b)   sem_getvalue_SysV(a, b)  #   define sem_getvalue(a, b)   sem_getvalue_SysV(a, b)
 #   define sem_open(...)        sem_open_SysV(__VA_ARGS__)  #   define sem_open(...)        sem_open_SysV(__VA_ARGS__)
Line 367  union semun Line 369  union semun
 //  SIGHUP  //  SIGHUP
 //  SIGALRM  //  SIGALRM
   
 #   define SIGTEST                  SIGUSR1  #   define SIGTEST                  255
   
 //  Nombre d'interruptions disponibles  //  Nombre d'interruptions disponibles
 #   define d_NOMBRE_INTERRUPTIONS   64  #   define d_NOMBRE_INTERRUPTIONS   64
Line 431  union semun Line 433  union semun
     __EXTERN__ jmp_buf              contexte_processus;      __EXTERN__ jmp_buf              contexte_processus;
     __EXTERN__ jmp_buf              contexte_thread;      __EXTERN__ jmp_buf              contexte_thread;
   
     __EXTERN__ int                  signal_test;      __EXTERN__ volatile int         signal_test;
   
     __EXTERN__ pid_t                pid_processus_pere;      __EXTERN__ pid_t                pid_processus_pere;
   
Line 443  union semun Line 445  union semun
                                             __STATIC_MUTEX_INITIALIZATION__;                                              __STATIC_MUTEX_INITIALIZATION__;
     __EXTERN__ pthread_mutex_t      mutex_gestionnaires_signaux_atomique      __EXTERN__ pthread_mutex_t      mutex_gestionnaires_signaux_atomique
                                             __STATIC_MUTEX_INITIALIZATION__;                                              __STATIC_MUTEX_INITIALIZATION__;
       __EXTERN__ pthread_mutex_t      mutex_sections_critiques;
   
     __EXTERN__ sem_t __PTR__        semaphore_gestionnaires_signaux;      __EXTERN__ sem_t __PTR__        semaphore_gestionnaires_signaux;
   
Line 1283  typedef struct liste_chainee Line 1286  typedef struct liste_chainee
   
 /*  /*
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
     Structure de gestion des signaux en provenance de rplsignal
   --------------------------------------------------------------------------------
   */
   
   #define d_NOMBRE_SIGNAUX                64
   
   typedef struct gestion_signaux
   {
       unsigned char               masque_signaux[d_NOMBRE_SIGNAUX];
   
       /*
        * 'I' : signal ignoré
        * 'Q' : signal mis en queue pour un traitement ultérieur
        * 'N' : traitement normal du signal
        */
   
       integer8                    queue_signaux[d_NOMBRE_SIGNAUX];
       integer8                    nombre_signaux_en_queue;
       struct_objet                *corps_signaux[d_NOMBRE_SIGNAUX];
   
       pthread_mutex_t             mutex;
   } struct_gestion_signaux;
   
   #ifndef MAIN_RPL
   #   define __STATIC_GESTION_SIGNAUX__
   #else
   #   define __STATIC_GESTION_SIGNAUX__ = { .mutex = PTHREAD_MUTEX_INITIALIZER }
   #endif
   
   __EXTERN__ volatile struct_gestion_signaux signaux_externes
           __STATIC_GESTION_SIGNAUX__;
   
   
   /*
   --------------------------------------------------------------------------------
   Structure liste profilage    Structure liste profilage
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
 */  */
Line 1444  typedef struct liste_pile_systeme Line 1482  typedef struct liste_pile_systeme
   
     /*      /*
     type clôture :      type clôture :
     C     SELECT  : END termine un test SELECT/DEFAULT/END.      C     SELECT   : END termine un test SELECT/DEFAULT/END.
     D     DO      : END termine une boucle DO/UNTIL/END.      D     DO       : END termine une boucle DO/UNTIL/END.
     I     IF      : END termine un test IF/THEN (ELSE)/END.      I     IF       : END termine un test IF/THEN (ELSE)/END.
     J     IFERR   : END termine un test IFERR/THEN (ELSE)/END.      J     IFERR    : END termine un test IFERR/THEN (ELSE)/END.
     K     CASE    : END termine un test CASE/THEN/END      K     CASE     : END termine un test CASE/THEN/END
     W     WHILE   : END termine une boucle WHILE/REPEAT/END.      W     WHILE    : END termine une boucle WHILE/REPEAT/END.
       Q     CRITICAL : END termine une section critique CRITICAL/END
   
     F     FOR     : NEXT ou STEP termine une boucle avec compteur.      F     FOR     : NEXT ou STEP termine une boucle avec compteur.
     S     START   : NEXT ou STEP termine une boucle sans compteur.      S     START   : NEXT ou STEP termine une boucle sans compteur.
     L     LOOP    : boucle utilisé dans le traitement de l'instruction RETURN.      L     LOOP    : boucle utilisé dans le traitement de l'instruction RETURN.
             Elle correspond à une boucle FOR ou START mais sans son              Elle correspond à une boucle FOR ou START mais sans son
             initialisation.              initialisation.
       A     FORALL  : NEXT termine une boucle sur un objet.
     */      */
   
     unsigned long               adresse_retour;      unsigned long               adresse_retour;
Line 1481  typedef union position_variable Line 1521  typedef union position_variable
 typedef struct variable  typedef struct variable
 {  {
     unsigned char           *nom;      unsigned char           *nom;
     unsigned char           origine;      unsigned char           origine; // P(rogramme) ou E(valuation)
   
     unsigned long           niveau;      unsigned long           niveau;
   
Line 1689  typedef struct instruction Line 1729  typedef struct instruction
   
 /*  /*
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
   Structure d'arbre des variables variable globales et locales    Structure d'arbre des variables globales et locales
 --------------------------------------------------------------------------------  --------------------------------------------------------------------------------
 */  */
   
 #ifndef RPLARGS  #ifndef RPLARGS
 typedef struct arbre_variables  typedef struct arbre_variables
 {  {
     unsigned int            noeuds_utilises;      unsigned int                        noeuds_utilises;
     signed int              indice_tableau_pere;                                          // Nombre de noeuds utilisés dans le
     struct arbre_variables  *noeud_pere;                                          // tableau **noeuds
     struct arbre_variables  **noeuds;      signed int                          indice_tableau_pere;
     struct liste_variables  *feuille;                                          // Position de la structure dans le
                                           // tableau **noeuds du père
   
       struct arbre_variables              *noeud_pere;
       struct arbre_variables              **noeuds;
   
       struct liste_variables              *feuille;
       struct liste_variables_statiques    *feuille_statique;
 } struct_arbre_variables;  } struct_arbre_variables;
   
 typedef struct tableau_variables  typedef struct tableau_variables
Line 1714  typedef struct tableau_variables Line 1761  typedef struct tableau_variables
                                         // de l'objet.                                          // de l'objet.
   
     logical1                variable_verrouillee;      logical1                variable_verrouillee;
       logical1                variable_masquee;
     union_position_variable variable_statique;      union_position_variable variable_statique;
     union_position_variable variable_partagee;      union_position_variable variable_partagee;
 } struct_tableau_variables;  } struct_tableau_variables;
   
   // La liste des variables est une liste doublement chaînée et circulaire.
 typedef struct liste_variables  typedef struct liste_variables
 {  {
     union      union
Line 1734  typedef struct liste_variables Line 1783  typedef struct liste_variables
     struct liste_variables              *precedent;      struct liste_variables              *precedent;
 } struct_liste_variables;  } struct_liste_variables;
   
   // La liste des variables statiques et une liste double chaînée et non
   // circulaire.
   typedef struct liste_variables_statiques
   {
       struct liste_variables_statiques    *suivant;
       struct liste_variables_statiques    *precedent;
       struct liste_variables_statiques    *reference;
       struct_variable_statique            *variable;
   } struct_liste_variables_statiques;
 #endif  #endif
   
 /*  /*
Line 1849  typedef struct processus Line 1907  typedef struct processus
   
     struct_arbre_variables      *s_arbre_variables;      struct_arbre_variables      *s_arbre_variables;
     struct_liste_variables      *l_liste_variables_par_niveau;      struct_liste_variables      *l_liste_variables_par_niveau;
       struct_liste_variables_statiques
                                   *l_liste_variables_statiques;
       struct_table_variables_partagees
                                   *s_liste_variables_partagees;
   
     logical1                    niveau_supprime;      logical1                    niveau_supprime;
   
     struct_variable             *pointeur_variable_courante;      struct_variable             *pointeur_variable_courante;
     struct_liste_variables      *pointeur_feuille_courante;      struct_liste_variables      *pointeur_feuille_courante;
       struct_variable_statique    *pointeur_variable_statique_courante;
   
     int                         *pointeurs_caracteres_variables;      int                         *pointeurs_caracteres_variables;
     int                         nombre_caracteres_variables;      int                         nombre_caracteres_variables;
   
     struct_variable_statique    *s_liste_variables_statiques;  
     unsigned long               nombre_variables_statiques;  
     unsigned long               nombre_variables_statiques_allouees;  
   
     struct_table_variables_partagees  
                                 *s_liste_variables_partagees;  
   
     unsigned long               niveau_courant;      unsigned long               niveau_courant;
     unsigned long               niveau_initial;      unsigned long               niveau_initial;
     unsigned long               position_variable_statique_courante;  
   
     logical1                    creation_variables_statiques;      logical1                    creation_variables_statiques;
     logical1                    creation_variables_partagees;      logical1                    creation_variables_partagees;
Line 2178  typedef struct processus Line 2234  typedef struct processus
   
     struct_liste_chainee        *liste_mutexes;      struct_liste_chainee        *liste_mutexes;
     pthread_mutex_t             protection_liste_mutexes;      pthread_mutex_t             protection_liste_mutexes;
       unsigned int                sections_critiques;
   
 /* Drapeau nécessaire à RESTART                 */  /* Drapeau nécessaire à RESTART                 */
   
Line 2350  void instruction_cosh(struct_processus * Line 2407  void instruction_cosh(struct_processus *
 void instruction_cov(struct_processus *s_etat_processus);  void instruction_cov(struct_processus *s_etat_processus);
 void instruction_cr(struct_processus *s_etat_processus);  void instruction_cr(struct_processus *s_etat_processus);
 void instruction_create(struct_processus *s_etat_processus);  void instruction_create(struct_processus *s_etat_processus);
   void instruction_critical(struct_processus *s_etat_processus);
 void instruction_crmtx(struct_processus *s_etat_processus);  void instruction_crmtx(struct_processus *s_etat_processus);
 void instruction_cross(struct_processus *s_etat_processus);  void instruction_cross(struct_processus *s_etat_processus);
 void instruction_crsmphr(struct_processus *s_etat_processus);  void instruction_crsmphr(struct_processus *s_etat_processus);
Line 2434  void instruction_fleche_str(struct_proce Line 2492  void instruction_fleche_str(struct_proce
 void instruction_fleche_table(struct_processus *s_etat_processus);  void instruction_fleche_table(struct_processus *s_etat_processus);
 void instruction_floor(struct_processus *s_etat_processus);  void instruction_floor(struct_processus *s_etat_processus);
 void instruction_for(struct_processus *s_etat_processus);  void instruction_for(struct_processus *s_etat_processus);
   void instruction_forall(struct_processus *s_etat_processus);
 void instruction_format(struct_processus *s_etat_processus);  void instruction_format(struct_processus *s_etat_processus);
 void instruction_fp(struct_processus *s_etat_processus);  void instruction_fp(struct_processus *s_etat_processus);
 void instruction_fs_test(struct_processus *s_etat_processus);  void instruction_fs_test(struct_processus *s_etat_processus);
Line 3062  struct_liste_chainee *sauvegarde_argumen Line 3121  struct_liste_chainee *sauvegarde_argumen
 #ifndef RPLARGS  #ifndef RPLARGS
 unsigned char *analyse_algebrique(struct_processus *s_etat_processus,  unsigned char *analyse_algebrique(struct_processus *s_etat_processus,
         unsigned char *chaine_algebrique, struct_liste_chainee **l_base_liste);          unsigned char *chaine_algebrique, struct_liste_chainee **l_base_liste);
   unsigned char *analyse_flux(struct_processus *s_etat_processus,
           unsigned char *flux, long longueur);
 unsigned char *recherche_chemin_fichiers_temporaires(struct_processus  unsigned char *recherche_chemin_fichiers_temporaires(struct_processus
         *s_etat_processus);          *s_etat_processus);
 unsigned char *compactage(unsigned char *chaine);  unsigned char *compactage(unsigned char *chaine);
Line 3111  unsigned char *transliteration(struct_pr Line 3172  unsigned char *transliteration(struct_pr
 */  */
   
 #ifndef RPLARGS  #ifndef RPLARGS
   logical1 ajout_bouchon_variable_statique(struct_processus *s_etat_processus);
 logical1 analyse_syntaxique(struct_processus *s_etat_processus);  logical1 analyse_syntaxique(struct_processus *s_etat_processus);
 logical1 caracteristiques_fichier(struct_processus *s_etat_processus,  logical1 caracteristiques_fichier(struct_processus *s_etat_processus,
         unsigned char *nom, logical1 *existence, logical1 *ouverture,          unsigned char *nom, logical1 *existence, logical1 *ouverture,
Line 3145  logical1 initialisation_fichier_acces_in Line 3207  logical1 initialisation_fichier_acces_in
 logical1 recherche_instruction_suivante(struct_processus *s_etat_processus);  logical1 recherche_instruction_suivante(struct_processus *s_etat_processus);
 logical1 retrait_variable(struct_processus *s_etat_processus,  logical1 retrait_variable(struct_processus *s_etat_processus,
         unsigned char *nom_variable, unsigned char type);          unsigned char *nom_variable, unsigned char type);
 logical1 retrait_variable_par_niveau(struct_processus *s_etat_processus);  logical1 retrait_variables_par_niveau(struct_processus *s_etat_processus);
 logical1 retrait_variable_partagee(struct_processus *s_etat_processus,  logical1 retrait_variable_partagee(struct_processus *s_etat_processus,
         unsigned char *nom_variable, union_position_variable position);          unsigned char *nom_variable, union_position_variable position);
   logical1 retrait_variables_statiques(struct_processus *s_etat_processus);
 logical1 retrait_variable_statique(struct_processus *s_etat_processus,  logical1 retrait_variable_statique(struct_processus *s_etat_processus,
         unsigned char *nom_variable, union_position_variable position);          unsigned char *nom_variable, union_position_variable position);
 logical1 sequenceur(struct_processus *s_etat_processus);  logical1 sequenceur(struct_processus *s_etat_processus);
Line 3175  logical1 recherche_variable_globale(stru Line 3238  logical1 recherche_variable_globale(stru
 logical1 recherche_variable_partagee(struct_processus *s_etat_processus,  logical1 recherche_variable_partagee(struct_processus *s_etat_processus,
         unsigned char *nom_variable, union_position_variable position,          unsigned char *nom_variable, union_position_variable position,
         unsigned char origine);          unsigned char origine);
 logical1 recherche_variable_statique(struct_processus *s_etat_processus,  
         unsigned char *nom_variable, union_position_variable position,  
         unsigned char origine);  
 logical1 test_cfsf(struct_processus *s_etat_processus,  logical1 test_cfsf(struct_processus *s_etat_processus,
         unsigned char indice_drapeau);          unsigned char indice_drapeau);
 logical1 test_expression_rpn(unsigned char *chaine);  logical1 test_expression_rpn(unsigned char *chaine);
Line 3308  struct_objet *parametres_sql(struct_proc Line 3368  struct_objet *parametres_sql(struct_proc
         struct_objet *s_parametres);          struct_objet *s_parametres);
 struct_objet *simplification(struct_processus *s_etat_processus,  struct_objet *simplification(struct_processus *s_etat_processus,
         struct_objet *s_objet);          struct_objet *s_objet);
   
   /*
   --------------------------------------------------------------------------------
     Fonctions renvoyant un pointeur sur une *struct_liste_variables_statiques
   --------------------------------------------------------------------------------
   */
   
   struct_liste_variables_statiques *recherche_variable_statique(struct_processus
           *s_etat_processus, unsigned char *nom_variable,
           union_position_variable position,
           unsigned char origine);
 #endif  #endif
   
 /*  /*
Line 3362  void f77multiplicationci_(complex16 *ca, Line 3433  void f77multiplicationci_(complex16 *ca,
 void f77multiplicationcr_(complex16 *ca, real8 *rb, complex16 *resultat);  void f77multiplicationcr_(complex16 *ca, real8 *rb, complex16 *resultat);
   
 void f77puissancecc_(complex16 *ca, complex16 *cb, complex16 *resultat);  void f77puissancecc_(complex16 *ca, complex16 *cb, complex16 *resultat);
 void f77puissanceci_(complex16 *ca, integer8 *ib, complex16 *resultat,  void f77puissanceci_(complex16 *ca, integer8 *ib, complex16 *resultat);
         integer4 *troncature);  
 void f77puissancecr_(complex16 *ca, real8 *rb, complex16 *resultat);  void f77puissancecr_(complex16 *ca, real8 *rb, complex16 *resultat);
 void f77puissanceic_(integer8 *ia, complex16 *cb, complex16 *resultat);  void f77puissanceic_(integer8 *ia, complex16 *cb, complex16 *resultat);
 void f77puissanceii_(integer8 *ia, integer8 *ib, integer8 *resultat);  void f77puissanceii_(integer8 *ia, integer8 *ib, integer8 *resultat);
 void f77puissanceir_(integer8 *ia, real8 *rb, real8 *resultat);  void f77puissanceir_(integer8 *ia, real8 *rb, real8 *resultat);
 void f77puissancerc_(real8 *ra, complex16 *cb, complex16 *resultat);  void f77puissancerc_(real8 *ra, complex16 *cb, complex16 *resultat);
 void f77puissanceri_(real8 *ra, integer8 *ib, real8 *resultat,  void f77puissanceri_(real8 *ra, integer8 *ib, real8 *resultat);
         integer4 *troncature);  
 void f77puissancerr_(real8 *ra, real8 *rb, real8 *resultat);  void f77puissancerr_(real8 *ra, real8 *rb, real8 *resultat);
   
 void f77racinecarreec_(complex16 *ca, complex16 *resultat);  void f77racinecarreec_(complex16 *ca, complex16 *resultat);

Removed from v.1.165  
changed lines
  Added in v.1.181


CVSweb interface <joel.bertrand@systella.fr>