nuclear@5: #ifndef THREAD_POOL_H_ nuclear@5: #define THREAD_POOL_H_ nuclear@5: nuclear@5: struct thread_pool; nuclear@5: nuclear@6: typedef void (*tpool_work_func)(void *data, void *cls); nuclear@5: nuclear@5: #define TPOOL_AUTO 0 nuclear@5: int tpool_init(struct thread_pool *tpool, int num_threads); nuclear@5: void tpool_destroy(struct thread_pool *tpool); nuclear@5: nuclear@10: struct thread_pool *tpool_create(int num_threads); nuclear@10: void tpool_free(struct thread_pool *tpool); nuclear@10: nuclear@5: void tpool_set_work_func(struct thread_pool *tpool, tpool_work_func func, void *cls); nuclear@5: nuclear@6: int tpool_add_work(struct thread_pool *tpool, void *data); nuclear@5: nuclear@5: #endif /* THREAD_POOL_H_ */