diff options
Diffstat (limited to 'shared.h')
-rw-r--r-- | shared.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -5,7 +5,7 @@ #define MAX_JOBS 100 #define MAX_PATH 256 -#define MAX_NODES 4 +#define MAX_NODES 2 #define SHM_NAME "/job_queue_shm" #define SHM_NODE_STATUS "/node_status_shm" @@ -13,12 +13,15 @@ typedef struct { pthread_mutex_t mutex; char jobs[MAX_JOBS][MAX_PATH]; - int head; + int job_nodes[MAX_JOBS]; // NEW + + int head; int tail; } JobQueue; typedef struct { int node_id; + int lport; int running_jobs; float load; // from /proc/[pid]/stat or getloadavg() } NodeStatus; |