diff options
Diffstat (limited to 'include/tinyff')
| -rw-r--r-- | include/tinyff/thread/thread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/tinyff/thread/thread.h b/include/tinyff/thread/thread.h index 1d0a644..252f044 100644 --- a/include/tinyff/thread/thread.h +++ b/include/tinyff/thread/thread.h @@ -4,6 +4,7 @@ #define TINYFF_THREAD_H #include <tinyff/common.h> +#include <tinyff/result.h> typedef void (*ff_job_cb)(void *arg); @@ -15,5 +16,9 @@ typedef struct { void *ff_thread_wrapper(void *ptr); +// High level helper: allocate a job using ctx->allocator and schedule it. +// Returns FF_RESULT_OK on success, or an error ff_result on failure. +ff_result ff_thread_submit(ff_ctx *ctx, ff_job_cb callback, void *arg); + #endif #endif
\ No newline at end of file |
