-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprerequisites.h
More file actions
41 lines (35 loc) · 829 Bytes
/
prerequisites.h
File metadata and controls
41 lines (35 loc) · 829 Bytes
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
37
38
39
40
41
#ifndef PREREQUISITES_H_
#define PREREQUISITES_H_
/*
@author Suleyman Golbol
@number 1801042656
*/
#define TRUE 1
#define FALSE 0
#define NO_EXIT 1
#define TEMP_PID "/tmp/singleton.pid"
/* A template name for client fifo */
#define TEMP_CLIENT_FIFO "/tmp/client_fifo"
/* Client fifo path name space */
#define CLIENT_FIFO_PATH_NAME_SIZE sizeof(TEMP_CLIENT_FIFO) + 10
typedef struct ClientRequest {
pid_t pid;
int sequenceLength;
int rowSize;
int totalMatrixSize;
int matrix[];
} ClientRequest;
typedef struct ServerResponse {
int serverPid;
int sequenceNumber;
int isInvertible;
} ServerResponse;
typedef struct SharedMemory {
int poolSizeZ;
int sleepTime;
int isRunning;
int isThereRequest;
// int available;
ClientRequest clientRequest;
} SharedMemoryForZ;
#endif