diff options
Diffstat (limited to 'src/threadpool.h')
| -rw-r--r-- | src/threadpool.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/threadpool.h b/src/threadpool.h index c28f03a..48ad9eb 100644 --- a/src/threadpool.h +++ b/src/threadpool.h | |||
| @@ -22,13 +22,14 @@ int cqueue_trypop(cqueue * const cq, task **ret); | |||
| 22 | int cqueue_waitpop(cqueue * const cq, task **ret); | 22 | int cqueue_waitpop(cqueue * const cq, task **ret); |
| 23 | int cqueue_cancel(cqueue * const cq); | 23 | int cqueue_cancel(cqueue * const cq); |
| 24 | 24 | ||
| 25 | threadpool * threadpool_init(int threads); | ||
| 26 | void threadpool_free(threadpool *tp); | ||
| 27 | int threadpool_addtask(threadpool * const tp, task * const task); | ||
| 28 | |||
| 25 | typedef struct mtxp mtxpair; | 29 | typedef struct mtxp mtxpair; |
| 26 | mtxpair * mtxpair_init(void * const data, int type); | 30 | mtxpair * mtxpair_init(void * const data, int type); |
| 27 | void mtxpair_free(mtxpair *mp); | 31 | void mtxpair_free(mtxpair *mp); |
| 28 | int mtxpair_setdata(mtxpair * const mp, void * const data); | 32 | int mtxpair_setdata(mtxpair * const mp, void * const data); |
| 29 | |||
| 30 | int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd); | 33 | int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd); |
| 31 | 34 | ||
| 32 | int cqueue_cancel(cqueue * const cq); | ||
| 33 | |||
| 34 | #endif \ No newline at end of file | 35 | #endif \ No newline at end of file |
