helper marco for dealing with syscalls that are interrupted

This commit is contained in:
Nikita Smith
2025-11-19 11:25:16 -08:00
parent a82cba0c87
commit e0d0cf6e29
+11
View File
@@ -38,6 +38,17 @@ int pthread_getname_np(pthread_t thread, char *name, size_t size);
typedef struct tm tm;
typedef struct timespec timespec;
////////////////////////////////
#define OS_LNX_RETRY_ON_EINTR(expr) \
(__extension__({ \
__typeof__(expr) __ret; \
do { \
__ret = (expr); \
} while ((__ret == -1) && errno == EINTR); \
__ret; \
}))
////////////////////////////////
//~ rjf: File Iterator