aboutsummaryrefslogtreecommitdiff
path: root/include/queue.h
blob: ca1161459713edc5d359f9fe8d26e7cbc1848447 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);