libresman
annotate src/threadpool.h @ 6:410c19c735b2
- removed the glew dependency
- initial thread pool implementation
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 03 Feb 2014 05:22:09 +0200 |
parents | bd9b4ff19c93 |
children | 4d18498a0078 |
rev | line source |
---|---|
nuclear@5 | 1 #ifndef THREAD_POOL_H_ |
nuclear@5 | 2 #define THREAD_POOL_H_ |
nuclear@5 | 3 |
nuclear@5 | 4 struct thread_pool; |
nuclear@5 | 5 |
nuclear@6 | 6 typedef void (*tpool_work_func)(void *data, void *cls); |
nuclear@5 | 7 |
nuclear@5 | 8 #define TPOOL_AUTO 0 |
nuclear@5 | 9 int tpool_init(struct thread_pool *tpool, int num_threads); |
nuclear@5 | 10 void tpool_destroy(struct thread_pool *tpool); |
nuclear@5 | 11 |
nuclear@5 | 12 void tpool_set_work_func(struct thread_pool *tpool, tpool_work_func func, void *cls); |
nuclear@5 | 13 |
nuclear@6 | 14 int tpool_add_work(struct thread_pool *tpool, void *data); |
nuclear@5 | 15 |
nuclear@5 | 16 #endif /* THREAD_POOL_H_ */ |