32 #ifndef CK_THREADPOOL_H
33 #define CK_THREADPOOL_H
36 #include <stdatomic.h>
48 #define CK_THREADPOOL_MAX_THREADS 64
51 #define CK_THREADPOOL_SPIN_COUNT 1024
54 #define CK_CACHE_LINE 64
76 typedef struct ck_threadpool ck_threadpool_t;
void ck_threadpool_pause(ck_threadpool_t *pool)
void ck_threadpool_resume(ck_threadpool_t *pool)
void ck_threadpool_global_destroy(void)
ck_threadpool_t * ck_threadpool_create(int n_threads)
void ck_threadpool_destroy(ck_threadpool_t *pool)
void ck_threadpool_barrier(ck_threadpool_t *pool)
void(* ck_work_fn_t)(int ith, int nth, void *args)
void ck_threadpool_dispatch(ck_threadpool_t *pool, ck_work_fn_t fn, void *args)
int ck_threadpool_thread_id(const ck_threadpool_t *pool)
int ck_threadpool_n_threads(const ck_threadpool_t *pool)
ck_threadpool_t * ck_threadpool_global(void)