summaryrefslogtreecommitdiff
path: root/src/threadpool.h
diff options
context:
space:
mode:
author@syxhe <https://t.me/syxhe>2025-05-16 19:09:02 -0500
committer@syxhe <https://t.me/syxhe>2025-05-16 19:09:02 -0500
commit60715c7785e7fbe4759df64258ad58a8e2a0769d (patch)
tree7471bc9816853518bdbc8baa02f817d5cf73594b /src/threadpool.h
parent5a5ff094101d63935f7fc65c124b3e56d553522d (diff)
Do some more work on the concurrent queue
Diffstat (limited to 'src/threadpool.h')
-rw-r--r--src/threadpool.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/threadpool.h b/src/threadpool.h
index db6fa2e..d7b713c 100644
--- a/src/threadpool.h
+++ b/src/threadpool.h
@@ -9,12 +9,18 @@ typedef struct cq cqueue;
9typedef struct tp threadpool; 9typedef struct tp threadpool;
10 10
11task * task_init(task_callback cb, void *arg); 11task * task_init(task_callback cb, void *arg);
12void task_free(task *ts); 12void task_free(void *ts);
13int task_fire(task *ts); 13int task_fire(task *ts);
14 14
15cqueue * cqueue_init(); 15cqueue * cqueue_init();
16void cqueue_cancel(cqueue * const cq); 16void cqueue_cancel(cqueue * const cq);
17void cqueue_free(void *cq); 17void cqueue_free(void *cq);
18 18int cqueue_addtask(cqueue * const cq, task * const tsk);
19task * cqueue_waitpop(cqueue * const cq);
20int cqueue_registerthreads(cqueue * const cq, int threads);
21int cqueue_registerthread(cqueue * const cq);
22int cqueue_iscanceled(cqueue * const cq);
23int cqueue_numthreads(cqueue * const cq);
24int cqueue_numtasks(cqueue * const cq);
19 25
20#endif \ No newline at end of file 26#endif \ No newline at end of file