summaryrefslogtreecommitdiff
path: root/shared.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2025-07-15 02:55:46 +0000
committerYour Name <you@example.com>2025-07-15 02:55:46 +0000
commit082e3adb0f3fd13b2f9de827449f1ec1ed037bf3 (patch)
tree3241cfc4b8cfbea201909df643f1011f650d8a27 /shared.h
parent2dbcce88ab7a73304f770006bcae53461c6daddc (diff)
0.9 + nightly builds
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;