klib
[Ported from github.com/attractivechaos/klib] added block arena
Brought by drakestapleton
klib / kthread.h
| 1 | #ifndef KTHREAD_H |
| 2 | #define KTHREAD_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n); |
| 9 | void kt_pipeline(int n_threads, void *(*func)(void*, int, void*), void *shared_data, int n_steps); |
| 10 | |
| 11 | void *kt_forpool_init(int n_threads); |
| 12 | void kt_forpool_destroy(void *_fp); |
| 13 | void kt_forpool(void *_fp, void (*func)(void*,long,int), void *data, long n); |
| 14 | |
| 15 | #ifdef __cplusplus |
| 16 | } |
| 17 | #endif |
| 18 | |
| 19 | #endif |