diff options
Diffstat (limited to 'test/suite')
-rw-r--r-- | test/suite/support/callbacks.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/suite/support/callbacks.h b/test/suite/support/callbacks.h index e01de39a2..2ef35156c 100644 --- a/test/suite/support/callbacks.h +++ b/test/suite/support/callbacks.h @@ -20,12 +20,14 @@ #include "base.h" +#include <errno.h> #include <semaphore.h> +#include <unistd.h> #define WAIT(callback) \ do { \ sem_t *semaphore = callbacks_get_semaphore(#callback); \ - sem_wait(semaphore); \ + TEMP_FAILURE_RETRY(sem_wait(semaphore)); \ } while (0) #define CALL_AND_WAIT(expression, callback) \ @@ -33,7 +35,7 @@ sem_t *semaphore = callbacks_get_semaphore(#callback); \ while (!sem_trywait(semaphore)); \ expression; \ - sem_wait(semaphore); \ + TEMP_FAILURE_RETRY(sem_wait(semaphore)); \ } while(0) // To be called from every exit point of the callback. This macro |