From b1e964269f4afc8f714687049b268a8901786e84 Mon Sep 17 00:00:00 2001 From: TazyFoundSoup Date: Thu, 11 Jun 2026 19:07:15 +1000 Subject: feat(thread): Add ff_thread_submit helper --- include/tinyff/thread/thread.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/tinyff') 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 +#include 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 -- cgit v1.2.3