#ifndef RT_JOBS_H
#define RT_JOBS_H

/* Work stealing job scheduler */

#include "runtime.h"

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void rt_job_fn(void *param, uint32_t iteration);

typedef struct {
    uint32_t iterations;
    rt_job_fn *fn;
    void *param;
} rt_job_decl;

RT_DLLEXPORT void rtDispatchJob(const rt_job_decl *decl);

#ifdef __cplusplus
}
#endif

#endif
