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

version 1.327, 2019/02/06 14:23:26 version 1.328, 2019/02/07 21:44:15
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 401  union semun Line 402  union semun
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 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 <%d>\n", (int) getpid(), (unsigned long long) \                  "line #%d <%d>\n", (int) getpid(), (unsigned long long) \
                         pthread_self(), \                          pthread_self(), \
                 #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); \
                   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 433  union semun Line 446  union semun
                         pthread_self(), \                          pthread_self(), \
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 sem_wait(a); })                  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(), \
                   #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                   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 441  union semun Line 461  union semun
                 #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \                  #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \
                 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

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


CVSweb interface <joel.bertrand@systella.fr>