2023-02-02 16:14:26 +01:00
|
|
|
#ifndef VIETER_JOB_QUEUE_INTERNAL
|
|
|
|
#define VIETER_JOB_QUEUE_INTERNAL
|
|
|
|
|
2023-04-01 17:04:40 +02:00
|
|
|
#include "vieter_cat_heap.h"
|
2023-03-07 11:55:12 +01:00
|
|
|
#include "vieter_heap.h"
|
|
|
|
#include "vieter_job_queue.h"
|
2023-02-02 16:14:26 +01:00
|
|
|
#include "vieter_tree.h"
|
2023-03-07 12:43:31 +01:00
|
|
|
#include <pthread.h>
|
2023-02-02 16:14:26 +01:00
|
|
|
|
|
|
|
struct vieter_job_queue {
|
|
|
|
vieter_tree *tree;
|
2023-04-01 17:04:40 +02:00
|
|
|
union {
|
|
|
|
vieter_heap *heap;
|
|
|
|
vieter_cat_heap *cat_heap;
|
|
|
|
} heaps[VIETER_JOB_STATES];
|
2023-03-07 12:43:31 +01:00
|
|
|
pthread_rwlock_t lock;
|
2023-02-02 16:14:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|