From ee3621075106ac6cff84a94432c12c89c9e45979 Mon Sep 17 00:00:00 2001 From: "@syxhe" Date: Thu, 24 Apr 2025 23:08:28 -0500 Subject: Yeah this shit brokey --- src/threadpool.h | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'src/threadpool.h') diff --git a/src/threadpool.h b/src/threadpool.h index bc3ce06..bd1b787 100644 --- a/src/threadpool.h +++ b/src/threadpool.h @@ -10,27 +10,13 @@ typedef struct tp threadpool; task * task_init(task_callback cb, void *arg); void task_free(task *ts); +int task_fire(task *ts); cqueue * cqueue_init(int mtx_type); -void cqueue_free(cqueue *cq); -int cqueue_append(cqueue * const cq, task *tsk); -int cqueue_prepend(cqueue * const cq, task *tsk); -int cqueue_insert(cqueue * const cq, task *tsk, int index); -int cqueue_size(cqueue const * const cq); -int cqueue_isempty(cqueue const * const cq); -int cqueue_trypop(cqueue * const cq, task **ret); -int cqueue_waitpop(cqueue * const cq, task **ret); -int cqueue_cancel(cqueue * const cq); - -threadpool * threadpool_init(int threads); -void threadpool_free(threadpool *tp); -int threadpool_addtask(threadpool * const tp, task * const task); -int threadpool_join(const threadpool * const tp); -typedef struct mtxp mtxpair; -mtxpair * mtxpair_init(void * const data, int type); -void mtxpair_free(mtxpair *mp); -int mtxpair_setdata(mtxpair * const mp, void * const data); -int thrd_createwmx(thrd_t * const thr, thrd_start_t func, mtxpair * const mtxd); +void cqueue_cancel(cqueue *cq); +void cqueue_free(cqueue *cq); +int cqueue_addtask(cqueue * const cq, task * const tsk); +task * cqueue_waitpop(cqueue * const cq); #endif \ No newline at end of file -- cgit v1.2.3