ops
This commit is contained in:
parent
03657962c8
commit
454203af84
|
@ -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
|
Loading…
Reference in New Issue