Compare commits

...

1 Commits

Author SHA1 Message Date
Jef Roosens 73a1221bb5 wip 2023-02-02 16:14:47 +01:00
2 changed files with 22 additions and 3 deletions

View File

@ -12,9 +12,9 @@
* other things.
*/
typedef enum vieter_job_state {
vieter_job_queued = 0,
vieter_job_dispatched = 1,
vieter_job_finished = 2
vieter_job_state_queued = 0,
vieter_job_state_ready = 1,
vieter_job_state_build_finished = 2
} vieter_job_state;
// This macro should be kept in sync with the above enum
@ -27,6 +27,14 @@ typedef struct vieter_job {
bool single;
vieter_job_state state;
uint64_t state_transition_times[VIETER_JOB_STATES];
bool dispatched;
void *build_config;
} vieter_job;
typedef struct vieter_job_queue vieter_job_queue;
vieter_job_queue *vieter_job_queue_init();
void vieter_job_queue_insert(int id);
#endif

View File

@ -0,0 +1,11 @@
#ifndef VIETER_JOB_QUEUE_INTERNAL
#define VIETER_JOB_QUEUE_INTERNAL
#include "vieter_tree.h"
struct vieter_job_queue {
vieter_tree *tree;
};
#endif