libresman
diff src/threadpool.h @ 5:bd9b4ff19c93
more stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 08:02:08 +0200 |
parents | |
children | 410c19c735b2 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/threadpool.h Sat Feb 01 08:02:08 2014 +0200 1.3 @@ -0,0 +1,16 @@ 1.4 +#ifndef THREAD_POOL_H_ 1.5 +#define THREAD_POOL_H_ 1.6 + 1.7 +struct thread_pool; 1.8 + 1.9 +typedef void (*tpool_work_func)(void*); 1.10 + 1.11 +#define TPOOL_AUTO 0 1.12 +int tpool_init(struct thread_pool *tpool, int num_threads); 1.13 +void tpool_destroy(struct thread_pool *tpool); 1.14 + 1.15 +void tpool_set_work_func(struct thread_pool *tpool, tpool_work_func func, void *cls); 1.16 + 1.17 +/* TODO cont. */ 1.18 + 1.19 +#endif /* THREAD_POOL_H_ */