diff options
Diffstat (limited to 'include/queue.h')
-rw-r--r-- | include/queue.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/queue.h b/include/queue.h index c81f062..cfc67ef 100644 --- a/include/queue.h +++ b/include/queue.h @@ -1,7 +1,7 @@ #include <pthread.h> -#include <stdint.h> #include <search.h> #include <semaphore.h> +#include <stdint.h> #include <sys/queue.h> #include "htab.h" @@ -17,12 +17,14 @@ typedef enum { struct queue { struct job_clist jobs; - struct htab *htab; - struct jobid *jobid; sem_t sem; queue_state_t state; pthread_mutex_t mutex; - uint64_t age; + struct htab *htab; + + /* solver */ + struct jobid *jobid; + int32_t resources; }; struct queue_thread { @@ -35,6 +37,7 @@ int queue_thread_new(struct queue_thread **queue_thread, FILE *stream); void queue_thread_free(struct queue_thread *queue_thread); void *queue_thread_entry(void *queue_thread); int queue_pop(struct queue *queue, struct job **job, struct htab *htab); +int queue_isempty(struct job_clist *jobs); #define QUEUE_H #endif |