summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--request.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/request.h b/request.h
index 03a0d5d..c70c03c 100644
--- a/request.h
+++ b/request.h
@@ -8,9 +8,29 @@ enum REQUEST_STATE {
};
struct REQUEST {
+ /*
+ * Identifier of the request. This will be set when
+ * the request is enqueued and is the request number
+ * count for the thread pool at that given moment.
+ */
int id;
+
+ /*
+ * Priority is used to determen on which fifo the
+ * request is placed. The 0 will be checked first
+ * and then till NUM_FIFOS
+ */
int priority;
+
+ /*
+ * State which the current request is in.
+ */
enum REQUEST_STATE state;
+
+ /*
+ * Callback method to handle the request. This method
+ * will be called from the worker thread.
+ */
int (*process)(struct REQUEST *request);
};