aboutsummaryrefslogtreecommitdiff
path: root/include/kpl/type.h
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-09-28 16:15:39 -0400
committernodist <kevin.comas.git@gmail.com>2026-09-28 16:15:39 -0400
commit2e908a7be31558cc98a9f0e97556e49ee5748c16 (patch)
tree3c8d8a7123d46b5e2b8f6a5c9943faf4c64c2efd /include/kpl/type.h
parent9a82127c476bf99556bbc69e181025afcba19d26 (diff)
inline some queue fns
Diffstat (limited to 'include/kpl/type.h')
-rw-r--r--include/kpl/type.h19
1 files changed, 19 insertions, 0 deletions
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;
+
+