mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-13 20:39:41 -07:00
helper marco for dealing with syscalls that are interrupted
This commit is contained in:
1 parent
a82cba0c87
commit
e0d0cf6e29
1 file changed
+11
@@ -38,6 +38,17 @@ int pthread_getname_np(pthread_t thread, char *name, size_t size);
|
|||||||
typedef struct tm tm;
|
typedef struct tm tm;
|
||||||
typedef struct timespec timespec;
|
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
|
//~ rjf: File Iterator
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user