aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorckrinitsin <101062646+ckrinitsin@users.noreply.github.com>2025-03-23 20:55:14 +0100
committerGitHub <noreply@github.com>2025-03-23 20:55:14 +0100
commit66d87280633590818261b89c50fe1830092174e4 (patch)
treed9231a5f2d52249657c7523af9c2ff11bdbe4196 /src/common
parent3939238f3fe46ed36919f29cbebe824341689960 (diff)
parentd6ea41e1bef4a312a8a1d6683bb29aad777ec9ae (diff)
downloadBT-Programming-Assignment-66d87280633590818261b89c50fe1830092174e4.tar.gz
BT-Programming-Assignment-66d87280633590818261b89c50fe1830092174e4.zip
Merge pull request #5 from ckrinitsin/fixesHEADmain
Fixes
Diffstat (limited to '')
-rw-r--r--src/common/shared_memory.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/shared_memory.h b/src/common/shared_memory.h
index fe101ea..465e79f 100644
--- a/src/common/shared_memory.h
+++ b/src/common/shared_memory.h
@@ -15,10 +15,16 @@
enum Operations { INSERT, DELETE, GET, PRINT };
/**
+ * @brief Possible statuses of a request.
+ */
+enum Status { FREE, SENT, PROCESSED };
+
+/**
* @brief One request constists out of the operation, the arguments and the response.
*/
struct Request {
Operations type;
+ Status status = FREE;
char key[MAX_KEY_SIZE];
char value[MAX_VALUE_SIZE];
char response[MAX_VALUE_SIZE];
@@ -38,7 +44,6 @@ struct SharedMemory {
int tail;
int head;
- bool full;
};
/**