diff options
author | root <root> | 2011-07-05 20:34:42 +0000 |
---|---|---|
committer | root <root> | 2011-07-05 20:34:42 +0000 |
commit | 9ec5a0945ff19e73cf8953060270c9d558be0847 (patch) | |
tree | fa2b9d13422d365d7743e612ee1258850c1f5f0e /eio.h | |
parent | dbeca454f3dc7f49df0fd6a848061a1031eca0f7 (diff) |
*** empty log message ***
Diffstat (limited to 'eio.h')
-rw-r--r-- | eio.h | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -45,6 +45,7 @@ extern "C" { #endif #include <stddef.h> +#include <signal.h> #include <sys/types.h> typedef struct eio_req eio_req; @@ -195,6 +196,12 @@ struct eio_req long int3; /* chown, fchown: gid */ int errorno; /* errno value on syscall return */ +#if __i386 || __amd64 + unsigned char cancelled; +#else + sig_atomic_t cancelled; +#endif + unsigned char flags; /* private */ signed char pri; /* the priority */ @@ -210,10 +217,9 @@ struct eio_req /* _private_ request flags */ enum { - EIO_FLAG_CANCELLED = 0x01, /* request was cancelled */ - EIO_FLAG_PTR1_FREE = 0x02, /* need to free(ptr1) */ - EIO_FLAG_PTR2_FREE = 0x04, /* need to free(ptr2) */ - EIO_FLAG_GROUPADD = 0x08 /* some request was added to the group */ + EIO_FLAG_PTR1_FREE = 0x01, /* need to free(ptr1) */ + EIO_FLAG_PTR2_FREE = 0x02, /* need to free(ptr2) */ + EIO_FLAG_GROUPADD = 0x04 /* some request was added to the group */ }; /* undocumented/unsupported/private helper */ @@ -308,7 +314,7 @@ void eio_grp_cancel (eio_req *grp); /* cancels all sub requests but not the g /* request api */ /* true if the request was cancelled, useful in the invoke callback */ -#define EIO_CANCELLED(req) ((req)->flags & EIO_FLAG_CANCELLED) +#define EIO_CANCELLED(req) ((req)->cancelled) #define EIO_RESULT(req) ((req)->result) /* returns a pointer to the result buffer allocated by eio */ |