From 2e908a7be31558cc98a9f0e97556e49ee5748c16 Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 28 Sep 2026 16:15:39 -0400 Subject: inline some queue fns --- include/kpl/type.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/kpl/type.h') diff --git a/include/kpl/type.h b/include/kpl/type.h index b068080..5003cf0 100644 --- a/include/kpl/type.h +++ b/include/kpl/type.h @@ -32,3 +32,22 @@ typedef struct { kpl_value value; int64_t tag; } kpl_result; + +typedef struct _kpl_task kpl_task; + +typedef struct _kpl_env kpl_env; + +typedef void kpl_task_fn(kpl_task *task, kpl_env *env); + +typedef struct _kpl_task { + struct _kpl_task *_Atomic next, *join; + kpl_task_fn *task_fn; + int32_t io_res; + uint32_t io_flags; + int32_t thread_id; + _Atomic bool canceled __attribute__((aligned(4))), join_ready __attribute__((aligned(8))); + kpl_result result; + // TODO TASK ARGUMENTS +} kpl_task; + + -- cgit v1.2.3