diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-06-08 10:35:16 +1000 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-06-08 10:35:16 +1000 |
| commit | edc34e77d5f19aa2a697f16d9e2d24677dafb506 (patch) | |
| tree | 2949e8b6cacf7f1d7232dfa6077de0b1c12d9326 /src/thread/thread.c | |
| parent | c9f5da1d19e6ace5d6a7c650fe996f359e11d1a5 (diff) | |
feat(thread): Implement pthread bridge and fix allocator usage in wrapperfeat/multi-threading
Diffstat (limited to 'src/thread/thread.c')
| -rw-r--r-- | src/thread/thread.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/thread/thread.c b/src/thread/thread.c index 524c64a..d8ba05b 100644 --- a/src/thread/thread.c +++ b/src/thread/thread.c @@ -1,12 +1,16 @@ +#ifdef USE_THREAD + #include <tinyff/thread/thread.h> -void *thread_wrapper(void *ptr) { +void *ff_thread_wrapper(void *ptr) { ff_thread_job *job = (ff_thread_job *)ptr; - + if (job->callback) { job->callback(job->arg); } - free(job); + job->ctx->allocator.ff_free(job); return NULL; } + +#endif
\ No newline at end of file |
