Diff for /rpl/src/rpl.h between versions 1.323 and 1.328

version 1.323, 2018/12/24 15:56:37 version 1.328, 2019/02/07 21:44:15
Line 1 Line 1
 /*  /*
 ================================================================================  ================================================================================
   RPL/2 (R) version 4.1.30    RPL/2 (R) version 4.1.31
   Copyright (C) 1989-2018 Dr. BERTRAND Joël    Copyright (C) 1989-2019 Dr. BERTRAND Joël
   
   This file is part of RPL/2.    This file is part of RPL/2.
   
Line 18 Line 18
   along with RPL/2. If not, write to info@cecill.info.    along with RPL/2. If not, write to info@cecill.info.
 ================================================================================  ================================================================================
 */  */
   #define DEBUG_ERREURS
   #define DEBUG_SEMAPHORES
   
 #ifndef INCLUSION_RPL  #ifndef INCLUSION_RPL
 #define INCLUSION_RPL  #define INCLUSION_RPL
Line 397  union semun Line 398  union semun
 #       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 #%d\n", (int) getpid(), (unsigned long long) i\                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value > 1) BUG(1, uprintf("Value %d\n", value)); \  
                 sem_wait_SysV(a); })                  sem_wait_SysV(a); })
 #   define sem_post(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                   "trywaiting at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                   sem_trywait_SysV(a); })
   #       define sem_post(a) ({ int value; sem_getvalue(a, &value); \
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "posting at %s() " \                  "posting at %s() " \
                 "line #%d\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value > 0) BUG(1, uprintf("Value %d\n", value)); \  
                 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); \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                   "destroying at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value == 0) BUG(1, uprintf("Value %d\n", value)); \                  if (value == 0) BUG(1, uprintf("Value %d\n", value)); \
                 sem_destroy_SysV(a); })                  sem_destroy_SysV(a); })
 #   else  #   else
Line 431  union semun Line 442  union semun
 #       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 #%d\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                   sem_wait(a); })
   #       define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                   "trywaiting at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value > 1) BUG(1, uprintf("Value %d\n", value)); sem_wait(a); })                  sem_trywait(a); })
 #       define sem_post(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_post(a) ({ int value; sem_getvalue(a, &value); \
                 uprintf("[%d-%llu] Semaphore %s (%p) "\                  uprintf("[%d-%llu] Semaphore %s (%p) "\
                 "posting at %s() " \                  "posting at %s() " \
                 "line #%d\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value > 0) BUG(1, uprintf("Value %d\n", value)); sem_post(a); })                  sem_post(a); })
 #       define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \  #       define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \
                   uprintf("[%d-%llu] Semaphore %s (%p) "\
                   "destroying at %s() " \
                   "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                           pthread_self(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 if (value == 0) BUG(1, uprintf("Value %d\n", value)); \                  if (value == 0) BUG(1, uprintf("Value %d\n", value)); \
                 sem_destroy(a); })                  sem_destroy(a); })
 #   endif  #   endif
Line 1584  typedef struct liste_pile_systeme Line 1607  typedef struct liste_pile_systeme
     logical1                    creation_variables_statiques;      logical1                    creation_variables_statiques;
     logical1                    creation_variables_partagees;      logical1                    creation_variables_partagees;
     logical1                    evaluation_expression;      logical1                    evaluation_expression;
       logical1                    debug_programme;
   
     unsigned char               clause;      unsigned char               clause;
   

Removed from v.1.323  
changed lines
  Added in v.1.328


CVSweb interface <joel.bertrand@systella.fr>