summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-06-11 19:07:15 +1000
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-06-11 19:07:15 +1000
commitb1e964269f4afc8f714687049b268a8901786e84 (patch)
tree8b8306afea9b5cf5759c4543fd85cfa7cf7be27a /include
parent039452e45658a1160cebe8937133d3fe7f9265b4 (diff)
feat(thread): Add ff_thread_submit helper
Diffstat (limited to 'include')
-rw-r--r--include/tinyff/thread/thread.h5
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