Diff for /rpl/src/rpl.h between versions 1.329 and 1.333

version 1.329, 2019/02/09 13:36:43 version 1.333, 2019/02/28 12:40:44
Line 325  enum signaux_rpl Line 325  enum signaux_rpl
     rpl_sighup,      rpl_sighup,
     rpl_sigtstp,      rpl_sigtstp,
     rpl_sigexcept,      rpl_sigexcept,
     rpl_sigmax      rpl_sigmax,
       rpl_siguser         // Base des signaux à la discrétion de l'utilisateur
 };  };
   
 #define LONGUEUR_QUEUE_SIGNAUX          1024  #define LONGUEUR_QUEUE_SIGNAUX          1024
Line 394  union semun Line 395  union semun
   
 #ifdef IPCS_SYSV  #ifdef IPCS_SYSV
 #   ifdef DEBUG_SEMAPHORES  #   ifdef DEBUG_SEMAPHORES
   #       define sem_init(a, b, c) ({ \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                           "initialization at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                   sem_init_SysV(a, b, c); })
 #       define sem_wait(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_wait(a) ({ int value; sem_getvalue(a, &value); \
                 if (strstr(#a, "fork") != NULL) \  
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "waiting at %s() " \                  "waiting at %s() " \
                 "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\
Line 403  union semun Line 410  union semun
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 sem_wait_SysV(a); })                  sem_wait_SysV(a); })
 #       define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \
                 if (strstr(#a, "fork") != NULL) \  
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "trywaiting at %s() " \                  "trywaiting at %s() " \
                 "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\
Line 411  union semun Line 417  union semun
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 sem_trywait_SysV(a); })                  sem_trywait_SysV(a); })
 #       define sem_post(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_post(a) ({ int value; sem_getvalue(a, &value); \
                 if (strstr(#a, "fork") != NULL) \  
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "posting at %s() " \                  "posting at %s() " \
                 "line #%d <%d>\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
Line 419  union semun Line 424  union semun
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 sem_post_SysV(a); })                  sem_post_SysV(a); })
 #       define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \
                 if (strstr(#a, "fork") != NULL) \  
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "destroying at %s() " \                  "destroying at %s() " \
                 "line #%d <%d>\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
Line 442  union semun Line 446  union semun
 #   define sem_unlink(a)        sem_unlink_SysV(a)  #   define sem_unlink(a)        sem_unlink_SysV(a)
 #else  #else
 #   ifdef DEBUG_SEMAPHORES  #   ifdef DEBUG_SEMAPHORES
   #       define sem_init(a, b, c) ({ \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                           "initialization at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, c), fflush(stdout); \
                   sem_init(a, b, c); })
 #       define sem_wait(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_wait(a) ({ int value; sem_getvalue(a, &value); \
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "waiting at %s() " \                  "waiting at %s() " \
Line 557  union semun Line 568  union semun
   
     __EXTERN__ pid_t                pid_processus_pere;      __EXTERN__ pid_t                pid_processus_pere;
   
       __EXTERN__ pthread_mutex_t      mutex_sigaction;
     __EXTERN__ pthread_mutex_t      mutex_liste_threads;      __EXTERN__ pthread_mutex_t      mutex_liste_threads;
       __EXTERN__ pthread_mutex_t      mutex_liste_threads_surveillance;
     __EXTERN__ pthread_mutex_t      mutex_creation_variable_partagee      __EXTERN__ pthread_mutex_t      mutex_creation_variable_partagee
                                             __STATIC_MUTEX_INITIALIZATION__;                                              __STATIC_MUTEX_INITIALIZATION__;
     __EXTERN__ pthread_mutex_t      mutex_sections_critiques;      __EXTERN__ pthread_mutex_t      mutex_sections_critiques;
Line 565  union semun Line 578  union semun
     __EXTERN__ pthread_mutex_t      mutex_sem __STATIC_MUTEX_INITIALIZATION__;      __EXTERN__ pthread_mutex_t      mutex_sem __STATIC_MUTEX_INITIALIZATION__;
   
     __EXTERN__ volatile int         routine_recursive;      __EXTERN__ volatile int         routine_recursive;
     __EXTERN__ volatile int         nombre_thread_surveillance_processus;      __EXTERN__ volatile int         nombre_threads_surveillance_processus;
   
 #   define SEM_FORK                 0  #   define SEM_FORK                 0
 #   define SEM_QUEUE                1  #   define SEM_QUEUE                1

Removed from v.1.329  
changed lines
  Added in v.1.333


CVSweb interface <joel.bertrand@systella.fr>