aboutsummaryrefslogtreecommitdiffstats
path: root/engines/afalg/e_afalg.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/afalg/e_afalg.h')
-rw-r--r--engines/afalg/e_afalg.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/engines/afalg/e_afalg.h b/engines/afalg/e_afalg.h
index 6c92485f3f..8b589e4b4b 100644
--- a/engines/afalg/e_afalg.h
+++ b/engines/afalg/e_afalg.h
@@ -71,6 +71,11 @@
fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
perror(NULL); \
} while(0)
+# define ALG_PWARN(x, ...) \
+ do { \
+ fprintf(stderr, "ALG_PERR: " x, __VA_ARGS__); \
+ perror(NULL); \
+ } while(0)
# ifndef AES_BLOCK_SIZE
# define AES_BLOCK_SIZE 16
@@ -80,11 +85,15 @@
# define MAX_INFLIGHTS 1
+typedef enum {
+ MODE_UNINIT = 0,
+ MODE_SYNC,
+ MODE_ASYNC
+} op_mode;
+
struct afalg_aio_st {
- int efd_sync; /* event fd when sync mode is used */
- int efd_async; /* event fd when async mode is used */
- int efd; /* event fd that is currently in use equal
- to either efd_sync or efd_async */
+ int efd;
+ op_mode mode;
aio_context_t aio_ctx;
struct io_event events[MAX_INFLIGHTS];
struct iocb cbt[MAX_INFLIGHTS];