header complition
This commit is contained in:
parent
23e9392876
commit
5bf18bb3cf
|
@ -1,6 +1,10 @@
|
|||
#ifndef SHM_H
|
||||
#define SHM_H
|
||||
|
||||
int getShmid();
|
||||
int getShmid(int row, int col);
|
||||
tile_t * shmServerAt(int shmid);
|
||||
tile_t * shmClientAt(int shmid);
|
||||
void shmDt(void *shm_ptr);
|
||||
void shmServerRm(int shmid);
|
||||
|
||||
#endif
|
|
@ -2,8 +2,6 @@
|
|||
#define STRUCTURES_H
|
||||
|
||||
|
||||
|
||||
|
||||
// semaphore
|
||||
union semun {
|
||||
int val;
|
||||
|
@ -28,8 +26,6 @@ typedef enum {
|
|||
PLAYER2
|
||||
} tile_t;
|
||||
|
||||
static const size_t SHM_SIZE = sizeof(shm_t);
|
||||
|
||||
// signal
|
||||
#define DEFAULT_SIGINT 2
|
||||
#define TIME_TO_RESET 10
|
||||
|
|
|
@ -33,8 +33,8 @@ tile_t * shmClientAt(int shmid) {
|
|||
return result;
|
||||
}
|
||||
|
||||
void shmDt(void *shm) {
|
||||
if (shmdt(shm) == -1) {
|
||||
void shmDt(void *shm_ptr) {
|
||||
if (shmdt(shm_ptr) == -1) {
|
||||
errExit("shmdt", "shmDt");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue