From de65adbc1b2d1b3efdbe6a023bb7435f84b2f3a7 Mon Sep 17 00:00:00 2001 From: nodist Date: Sat, 3 Oct 2026 08:50:07 -0400 Subject: redesign --- include/kpl/process.h | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 include/kpl/process.h (limited to 'include/kpl/process.h') diff --git a/include/kpl/process.h b/include/kpl/process.h deleted file mode 100644 index 528365a..0000000 --- a/include/kpl/process.h +++ /dev/null @@ -1,39 +0,0 @@ - -#pragma once - -// Kpl threads, allocators, atomic queues and garbage collection - -#include "kpl/queue.h" - -typedef enum : int8_t { - KPL_CONFIG_THREAD_COUNT_AFFINITY = -1, - KPL_CONFIG_THREAD_COUNT_MAX = 127 -} kpl_config_thread_count; - -typedef enum : uint8_t { - KPL_CONFIG_THREAD_RING_POOL_COUNT = 28, - KPL_CONFIG_THREAD_RING_POOL_MIN_OBJECT_SIZE_POW2 = 5, - KPL_CONFIG_THREAD_RING_POOL_MAX_OBJECT_SIZE_POW2 = 27, - KPL_CONFIG_THREAD_RING_POOL_MIN_RING_SIZE_POW2 = 6, - KPL_CONFIG_THREAD_RING_POOL_MAX_RING_SIZE_POW2 = 20 -} kpl_config_thread_ring_pool; - -typedef struct { - int8_t count, ring_pool_entries_pow2[KPL_CONFIG_THREAD_RING_POOL_COUNT]; -} kpl_config_thread; - -typedef struct { - int32_t thread_id; - _Atomic ssize_t priority; - kpl_env *env; - kpl_task_queue task_queue; - // TODO - sem_t sem; - pthread_t pthread; -} kpl_thread; - -typedef struct { - kpl_config_thread *config_thread; - kpl_thread *threads; - kpl_ring_queue memory_pool[KPL_CONFIG_THREAD_RING_POOL_COUNT]; -} kpl_process; -- cgit v1.2.3