aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-06-14 20:27:10 +0530
committersinanmohd <sinan@sinanmohd.com>2024-06-14 20:42:14 +0530
commitf407bbb1b00194fdc89ca382f4cf2f1f536ab18e (patch)
tree1e69cc2d1360e950b9e85208352849038cfca2f6 /include
parent58fe7d147774960e3fb7dbc53a3e5ecf106ebf01 (diff)
queue: recover from nix eval errors
Diffstat (limited to 'include')
-rw-r--r--include/jobs.h9
-rw-r--r--include/queue.h2
2 files changed, 9 insertions, 2 deletions
diff --git a/include/jobs.h b/include/jobs.h
index 1044eaa..3a1fb19 100644
--- a/include/jobs.h
+++ b/include/jobs.h
@@ -21,10 +21,17 @@ struct job {
CIRCLEQ_ENTRY(job) clist;
};
+typedef enum {
+ JOB_READ_SUCCESS = 0,
+ JOB_READ_EOF = 1,
+ JOB_READ_EVAL_ERR = 2,
+ JOB_READ_JSON_INVAL = 3,
+} job_read_state_t;
+int job_read(FILE *stream, struct job **jobs);
+
int jobs_init(FILE **stream);
int job_new(struct job **j, char *name, char *drv_path);
void job_free(struct job *j);
-int job_read(FILE *stream, struct job **jobs);
#define JOBS_H
#endif
diff --git a/include/queue.h b/include/queue.h
index 5f2d5f4..6608ec4 100644
--- a/include/queue.h
+++ b/include/queue.h
@@ -1,6 +1,6 @@
#include <pthread.h>
-#include <sys/queue.h>
#include <semaphore.h>
+#include <sys/queue.h>
#include "jobs.h"