blob: a5d6ca12db071b69442747d033d6c6034646c375 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
}
|