--- rpl/src/rpl.h 2019/02/07 21:44:15 1.328 +++ rpl/src/rpl.h 2019/02/09 13:36:43 1.329 @@ -18,8 +18,7 @@ along with RPL/2. If not, write to info@cecill.info. ================================================================================ */ -#define DEBUG_ERREURS -#define DEBUG_SEMAPHORES + #ifndef INCLUSION_RPL #define INCLUSION_RPL @@ -396,6 +395,7 @@ union semun #ifdef IPCS_SYSV # ifdef DEBUG_SEMAPHORES # define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ + if (strstr(#a, "fork") != NULL) \ uprintf("[%d-%llu] Semaphore %s (%p) "\ "waiting at %s() " \ "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\ @@ -403,6 +403,7 @@ union semun #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ sem_wait_SysV(a); }) # define sem_trywait(a) ({ int value; sem_getvalue(a, &value); \ + if (strstr(#a, "fork") != NULL) \ uprintf("[%d-%llu] Semaphore %s (%p) "\ "trywaiting at %s() " \ "line #%d <%d>\n", (int) getpid(), (unsigned long long) i\ @@ -410,6 +411,7 @@ union semun #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ sem_trywait_SysV(a); }) # define sem_post(a) ({ int value; sem_getvalue(a, &value); \ + if (strstr(#a, "fork") != NULL) \ uprintf("[%d-%llu] Semaphore %s (%p) "\ "posting at %s() " \ "line #%d <%d>\n", (int) getpid(), (unsigned long long) \ @@ -417,6 +419,7 @@ union semun #a, a, __FUNCTION__, __LINE__, value), fflush(stdout); \ sem_post_SysV(a); }) # define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ + if (strstr(#a, "fork") != NULL) \ uprintf("[%d-%llu] Semaphore %s (%p) "\ "destroying at %s() " \ "line #%d <%d>\n", (int) getpid(), (unsigned long long) \ @@ -3307,7 +3310,8 @@ int envoi_signal_contexte(struct_process enum signaux_rpl signal); int envoi_signal_processus(pid_t pid, enum signaux_rpl signal, logical1 test_ouverture); -int envoi_signal_thread(pthread_t tid, enum signaux_rpl signal); +int envoi_signal_thread(struct_processus *s_etat_processus, + pthread_t tid, enum signaux_rpl signal); #endif /*