aboutsummaryrefslogtreecommitdiff
path: root/src/tpool.h
blob: 04f04861aea79669c624a8694250ddc530408677 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef GRAB_TPOOL_H
#define GRAB_TPOOL_H

#include <pthread.h>
#include <stdatomic.h>
#include <stddef.h>

typedef struct {
	int tcnt;
	pthread_t *thrds;
	atomic_ptrdiff_t wi;
	const char **files;
	ptrdiff_t filecnt;
} tpool_t;

int tpinit(tpool_t *tp, const char **files, ptrdiff_t filecnt);
void tpfree(tpool_t *tp);

#endif /* !GRAB_TPOOL_H */