From: Heng Li Date: Sat, 2 Nov 2013 12:26:41 +0000 (-0400) Subject: forgot the header file X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=83c05ff2084cc1059e4ba2e7dd6afe47a01e4ec3;p=klib.git forgot the header file For kt_for() it is actually not needed. --- diff --git a/kthread.h b/kthread.h new file mode 100644 index 0000000..ee9896c --- /dev/null +++ b/kthread.h @@ -0,0 +1,23 @@ +#ifndef KTHREAD_H +#define KTHREAD_H + +#define KT_MAX_TASKS 1024 + +struct kthread_t; +typedef struct kthread_t kthread_t; + +#ifdef __cplusplus +extern "C" { +#endif + +kthread_t *kt_init(int n_threads); +int kt_spawn(kthread_t *t, int n, void (*func)(void*,int,int), void *data); +void kt_sync(kthread_t *t); + +void kt_for(int n_threads, int n, void (*func)(void*,int,int), void *data); + +#ifdef __cplusplus +} +#endif + +#endif