Diff for /rpl/src/rpl.h between versions 1.36 and 1.43

version 1.36, 2010/05/19 09:22:34 version 1.43, 2010/06/19 15:54:51
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.0.15    RPL/2 (R) version 4.0.16
   Copyright (C) 1989-2010 Dr. BERTRAND Joël    Copyright (C) 1989-2010 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
Line 28 Line 28
 #define _REENTRANT  #define _REENTRANT
   
 #ifdef Darwin  #ifdef Darwin
 #   define SIGPOLL          SIGINFO  #   define  _DARWIN_C_SOURCE
 #   define _DARWIN_C_SOURCE  
 #endif  #endif
   
   
 /*  /*
 ================================================================================  ================================================================================
   INCLUSIONS    INCLUSIONS
Line 127 Line 127
 */  */
   
 #ifndef RPLARGS  #ifndef RPLARGS
   #   ifdef Darwin
   #       define SIGPOLL              SIGINFO
   #   endif
   
 //  Arrêt par STOP  //  Arrêt par STOP
 #   define SIGFSTOP                 SIGUSR1  #   define SIGFSTOP                 SIGUSR1
 //  Démarrage d'un processus fils  //  Démarrage d'un processus fils
Line 137 Line 141
 #   define SIGABORT                 SIGPROF  #   define SIGABORT                 SIGPROF
 //  Arrêt d'un processus fils depuis autre chose que STOP  //  Arrêt d'un processus fils depuis autre chose que STOP
 #   define SIGFABORT                SIGPOLL  #   define SIGFABORT                SIGPOLL
   //  Nombre d'interruptions disponibles
 #   define d_NOMBRE_INTERRUPTIONS   64  #   define d_NOMBRE_INTERRUPTIONS   64
 #endif  #endif
   
Line 433  int sem_getvalue2(sem_t *semaphore, int Line 438  int sem_getvalue2(sem_t *semaphore, int
 void analyse_post_mortem();  void analyse_post_mortem();
 void *debug_memoire_ajout(size_t taille, const unsigned char *fonction,  void *debug_memoire_ajout(size_t taille, const unsigned char *fonction,
         unsigned long ligne, const unsigned char *argument);          unsigned long ligne, const unsigned char *argument);
   void debug_memoire_initialisation();
 void *debug_memoire_modification(void *pointeur, size_t taille,  void *debug_memoire_modification(void *pointeur, size_t taille,
         const unsigned char *fonction, unsigned long ligne,          const unsigned char *fonction, unsigned long ligne,
         const unsigned char *argument);          const unsigned char *argument);
 void debug_memoire_reinitialisation();  
 void debug_memoire_retrait(void *ptr);  void debug_memoire_retrait(void *ptr);
 void debug_memoire_verification();  void debug_memoire_verification();
   
   pid_t debug_fork();
   
 #define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s)  #define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s)
 #define free(s) debug_memoire_retrait(s)  #define free(s) debug_memoire_retrait(s)
 #define realloc(s, t) debug_memoire_modification(s, t, \  #define realloc(s, t) debug_memoire_modification(s, t, \
             __FUNCTION__, __LINE__, #t)              __FUNCTION__, __LINE__, #t)
   #define fork() debug_fork()
 #endif  #endif
   
 #ifdef DEBUG_RETURN  #ifdef DEBUG_RETURN
Line 483  void debug_memoire_verification(); Line 491  void debug_memoire_verification();
         if (value == 0) BUG(1, uprintf("Value %d\n", value)); sem_destroy(a); })          if (value == 0) BUG(1, uprintf("Value %d\n", value)); sem_destroy(a); })
 #endif  #endif
   
 #ifdef DEBUG_MALLOC  
 #define malloc(taille) ({ size_t s = taille; void *p; \  
         p = malloc(taille); if (p != NULL) memset(p, 0, s); \  
         /*uprintf("[%d-%llu] Allocating %p (%d bytes) at %s() line #%d\n", \  
         (int) getpid(), (unsigned long long) pthread_self(), p, \  
         (int) s, __FUNCTION__, __LINE__); fflush(stdout); */ p; })  
 #endif  
   
 #ifdef DEBUG_FREE  
 #define free(ptr) ({ void *p = ptr; \  
         /*uprintf("[%d-%llu] Freeing %p (%d bytes) at %s() line #%d\n", \  
         (int) getpid(), (unsigned long long) pthread_self(), p, \  
         (int) sizeof(p), __FUNCTION__, __LINE__); fflush(stdout); */ \  
         if (p != NULL) memset(p, 0, sizeof(p)); free(p); })  
 #endif  
   
 /*  /*
 ================================================================================  ================================================================================
Line 737  void debug_memoire_verification(); Line 730  void debug_memoire_verification();
 #   define d_ex_enregistrement_inexistant       __erreur(79)  #   define d_ex_enregistrement_inexistant       __erreur(79)
 #   define d_ex_clef_inexistante                __erreur(80)  #   define d_ex_clef_inexistante                __erreur(80)
 #   define d_ex_nom_implicite                   __erreur(81)  #   define d_ex_nom_implicite                   __erreur(81)
   #   define d_ex_version_bibliotheque            __erreur(82)
 #endif  #endif
   
   
Line 1138  typedef struct descripteur_thread Line 1132  typedef struct descripteur_thread
     pthread_t                   thread_pere;      pthread_t                   thread_pere;
   
     pthread_mutex_t             mutex;      pthread_mutex_t             mutex;
   
     volatile logical1           thread_actif;      volatile logical1           thread_actif;
   
     int                         pipe_erreurs[2];      int                         pipe_erreurs[2];
Line 1858  typedef struct processus Line 1853  typedef struct processus
   
     // Mutex spécifique au processus et donnant accès à la pile des processus      // Mutex spécifique au processus et donnant accès à la pile des processus
     pthread_mutex_t             mutex;      pthread_mutex_t             mutex;
       pthread_mutex_t             mutex_allocation;
   
     // Sémaphore autorisant les fork()      // Sémaphore autorisant les fork()
     sem_t      sem_t

Removed from v.1.36  
changed lines
  Added in v.1.43


CVSweb interface <joel.bertrand@systella.fr>