aboutsummaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
authorCara Salter <cara@devcara.com>2022-08-15 23:43:52 -0400
committerCara Salter <cara@devcara.com>2022-08-15 23:43:52 -0400
commite6ae01729aeaffc560c59e7887c5743521677e4d (patch)
tree34ea1333a9c0ce85ac72852cd7fd1b85651dda9d /src/game.c
parentf15f93f6e55d6c09b5f556f8fc8e21c29f549a96 (diff)
downloadcmud-e6ae01729aeaffc560c59e7887c5743521677e4d.tar.gz
cmud-e6ae01729aeaffc560c59e7887c5743521677e4d.zip
data work
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/game.c b/src/game.c
new file mode 100644
index 0000000..a5d6ca1
--- /dev/null
+++ b/src/game.c
@@ -0,0 +1,36 @@
+/*
+ * =====================================================================================
+ *
+ * Filename: game.c
+ *
+ * Description: Implementations for the global action request tracker
+ *
+ * Version: 1.0
+ * Created: 01/31/2022 11:59:12 AM
+ * Revision: none
+ * Compiler: gcc
+ *
+ * Author: Cara Salter <cara@devcara.com>,
+ * Organization:
+ *
+ * =====================================================================================
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <threads.h>
+#include "game.h"
+
+static mtx_t queue;
+
+int game_loop() {
+ int err = 0;
+
+ // Initialize mutex
+ err = mtx_init(&queue, mtx_plain);
+ if (err == thrd_error) {
+ perror("initializing mutex");
+ return -1;
+ }
+
+ return err;
+}