From 9ec5a0945ff19e73cf8953060270c9d558be0847 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 5 Jul 2011 20:34:42 +0000 Subject: *** empty log message *** --- eio.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'eio.h') diff --git a/eio.h b/eio.h index 2f8f029..bfa110d 100644 --- a/eio.h +++ b/eio.h @@ -45,6 +45,7 @@ extern "C" { #endif #include +#include #include 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 */ -- cgit v1.2.3