From 83c05ff2084cc1059e4ba2e7dd6afe47a01e4ec3 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Sat, 2 Nov 2013 08:26:41 -0400 Subject: [PATCH] forgot the header file For kt_for() it is actually not needed. --- kthread.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 kthread.h 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 -- 2.47.3