aboutsummaryrefslogtreecommitdiff
path: root/include/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/queue.h')
-rw-r--r--include/queue.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/queue.h b/include/queue.h
new file mode 100644
index 0000000..ca11614
--- /dev/null
+++ b/include/queue.h
@@ -0,0 +1,19 @@
+#include <pthread.h>
+#include <sys/queue.h>
+
+#include "jobs.h"
+
+struct queue {
+ struct job_clist jobs;
+ pthread_mutex_t mutex;
+};
+
+struct queue_thread {
+ pthread_t tid;
+ struct queue *queue;
+ FILE *stream;
+};
+
+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);