summaryrefslogtreecommitdiff
path: root/shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared.h')
-rw-r--r--shared.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/shared.h b/shared.h
index 30c8ffe..05f85c6 100644
--- a/shared.h
+++ b/shared.h
@@ -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;