This commit is contained in:
Lorenzo Bianchi 2023-05-21 12:04:34 +02:00
parent 03657962c8
commit 454203af84
1 changed files with 38 additions and 0 deletions

38
inc/structures.h Normal file
View File

@ -0,0 +1,38 @@
#ifndef STRUCTURES_H
#define STRUCTURES_H
#include <sys/types.h>
// semaphore
union semun {
int val;
struct semid_ds * buf;
unsigned short * array;
};
// shared memory
#define KEYFILE "../LICENSE"
#define SHMERR (void *)-1
typedef struct {
int collums;
int rows;
char player1Token;
char player2Token;
} input_server_t;
typedef enum {
EMPTY,
PLAYER1,
PLAYER2
} tile_t;
int semid;
int _MSGQID;
int shmid;
tile_t *board;
pid_t pids[2];
#endif