summaryrefslogtreecommitdiff
path: root/src/threadpool.h
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-04-22 16:59:33 -0500
committer@syxhe <https://t.me/syxhe>2025-04-22 16:59:33 -0500
commit39c3fa785cafd5fa9b75bfbf92d7a702310ba480 (patch)
tree700be73b55b791ab3907fc7d39a92a888ff94b34 /src/threadpool.h
parent0ee5044805c8d157d5023fc1322f980e3a480df7 (diff)
Yay segfault
Diffstat (limited to 'src/threadpool.h')
-rw-r--r--src/threadpool.h7
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);
22int cqueue_waitpop(cqueue * const cq, task **ret); 22int cqueue_waitpop(cqueue * const cq, task **ret);
23int cqueue_cancel(cqueue * const cq); 23int cqueue_cancel(cqueue * const cq);
24 24
25threadpool * threadpool_init(int threads);
26void threadpool_free(threadpool *tp);
27int threadpool_addtask(threadpool * const tp, task * const task);
28
25typedef struct mtxp mtxpair; 29typedef struct mtxp mtxpair;
26mtxpair * mtxpair_init(void * const data, int type); 30mtxpair * mtxpair_init(void * const data, int type);
27void mtxpair_free(mtxpair *mp); 31void mtxpair_free(mtxpair *mp);
28int mtxpair_setdata(mtxpair * const mp, void * const data); 32int mtxpair_setdata(mtxpair * const mp, void * const data);
29
30int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd); 33int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd);
31 34
32int cqueue_cancel(cqueue * const cq);
33
34#endif \ No newline at end of file 35#endif \ No newline at end of file