summaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'main.h')
-rw-r--r--main.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/main.h b/main.h
index 086cd92..a3b5512 100644
--- a/main.h
+++ b/main.h
@@ -24,6 +24,13 @@ struct uring_task;
/* To save typing in all the function definitions below */
typedef void (*callback_t)(struct cfg *, struct uring_task *, int res);
+typedef int (*rcallback_t)(struct cfg *, struct uring_task *, int res);
+
+struct uring_task_buf {
+ char buf[4096];
+ size_t len;
+ size_t done;
+};
struct uring_task {
const char *name;
@@ -32,7 +39,10 @@ struct uring_task {
void *parent;
void (*free)(struct uring_task *);
bool dead;
+ struct uring_task_buf *tbuf;
callback_t callback;
+ rcallback_t complete_callback; /* to check if tbuf processing is done */
+ callback_t final_callback; /* once tbuf processing is done */
};
struct cfg {