From de65adbc1b2d1b3efdbe6a023bb7435f84b2f3a7 Mon Sep 17 00:00:00 2001 From: nodist Date: Sat, 3 Oct 2026 08:50:07 -0400 Subject: redesign --- include/kpl/type.h | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 include/kpl/type.h (limited to 'include/kpl/type.h') diff --git a/include/kpl/type.h b/include/kpl/type.h deleted file mode 100644 index 5003cf0..0000000 --- a/include/kpl/type.h +++ /dev/null @@ -1,53 +0,0 @@ - -#pragma once - -// KPL specific types - -#include "system.h" - -typedef enum : int32_t { - KPL_EXIT_CODE_SUCCESS = 0, - KPL_EXIT_CODE_ERROR = 1, - KPL_EXIT_CODE_HELP = 2 -} kpl_exit_code; - -typedef uint8_t kpl_utf8[4]; - -typedef union { - uint8_t u8; - int8_t i8; - uint16_t u16; - int16_t i16; - uint32_t u32; - int32_t i32; - uint64_t u64; - int64_t i64; - kpl_utf8 utf8; - float f32; - double f64; - void *ptr; -} kpl_value; - -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