diff options
Diffstat (limited to 'src/shared/barrier.c')
-rw-r--r-- | src/shared/barrier.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/barrier.c b/src/shared/barrier.c index 87061f55d7..cbe54a60cd 100644 --- a/src/shared/barrier.c +++ b/src/shared/barrier.c @@ -10,6 +10,7 @@ #include <unistd.h> #include "barrier.h" +#include "errno-util.h" #include "fd-util.h" #include "io-util.h" #include "macro.h" @@ -178,7 +179,7 @@ static bool barrier_write(Barrier *b, uint64_t buf) { assert(b->me >= 0); do { len = write(b->me, &buf, sizeof(buf)); - } while (len < 0 && IN_SET(errno, EAGAIN, EINTR)); + } while (len < 0 && ERRNO_IS_TRANSIENT(errno)); if (len != sizeof(buf)) goto error; @@ -230,7 +231,7 @@ static bool barrier_read(Barrier *b, int64_t comp) { /* events on @them signal new data for us */ len = read(b->them, &buf, sizeof(buf)); - if (len < 0 && IN_SET(errno, EAGAIN, EINTR)) + if (len < 0 && ERRNO_IS_TRANSIENT(errno)) continue; if (len != sizeof(buf)) |