diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-06 15:42:50 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-06 15:42:50 -0400 |
| commit | 7df3d08d8dd0d81f24f0788b44efd37883d3c1c8 (patch) | |
| tree | 8a30d983fe92451f2b7048e06ee8f1121e314a6a /docs/application | |
| parent | 1d5f5dd3cd5cc07352379fe33930770e3d203f3a (diff) | |
start io and remove print op
Diffstat (limited to 'docs/application')
| -rw-r--r-- | docs/application/buffer.md | 2 | ||||
| -rw-r--r-- | docs/application/index.md | 3 | ||||
| -rw-r--r-- | docs/application/interface.md | 4 | ||||
| -rw-r--r-- | docs/application/io.md | 5 | ||||
| -rw-r--r-- | docs/application/namespace.md | 21 | ||||
| -rw-r--r-- | docs/application/queue.md | 14 | ||||
| -rw-r--r-- | docs/application/thread.md | 16 | ||||
| -rw-r--r-- | docs/application/type.md | 4 |
8 files changed, 49 insertions, 20 deletions
diff --git a/docs/application/buffer.md b/docs/application/buffer.md index d72eb8a..230c2d6 100644 --- a/docs/application/buffer.md +++ b/docs/application/buffer.md @@ -12,3 +12,5 @@ typedef struct _kpl_buffer { uint8_t bytes; } kpl_buffer; ``` + +## Unicode Methods diff --git a/docs/application/index.md b/docs/application/index.md index 7d97cda..2717005 100644 --- a/docs/application/index.md +++ b/docs/application/index.md @@ -4,7 +4,7 @@ # Requirements -* Linux X64 +* Linux X64 with io_uring (6+) * GNU Make * GCC with -std=gnu99 -fhardened (14+) @@ -14,6 +14,7 @@ * ##### [Type](./type.md) * ##### [Pool](./pool.md) * ##### [Thread](./thread.md) +* ##### [Io](./io.md) * ##### [Tuple](./tuple.md) * ##### [Buffer](./buffer.md) * ##### [Map](./map.md) diff --git a/docs/application/interface.md b/docs/application/interface.md index 5042bb4..8a5dc69 100644 --- a/docs/application/interface.md +++ b/docs/application/interface.md @@ -28,10 +28,10 @@ typedef bool kpl_any_eq_fn(const kpl_any a, const kpl_any b); typedef ssize_t kpl_any_cmp_fn(const kpl_any a, const kpl_any b); -typedef int32_t kpl_any_print_fn(const kpl_any a, FILE *file, size_t idnt, uint32_t print_opts); - typedef void kpl_any_free_fn(kpl_any a); +// TODO write + typedef struct { // TODO } kpl_interface; diff --git a/docs/application/io.md b/docs/application/io.md new file mode 100644 index 0000000..50e21ff --- /dev/null +++ b/docs/application/io.md @@ -0,0 +1,5 @@ +# Io + +--- + +All IO is done through lib_uring diff --git a/docs/application/namespace.md b/docs/application/namespace.md index f49ebf1..6891376 100644 --- a/docs/application/namespace.md +++ b/docs/application/namespace.md @@ -5,33 +5,34 @@ ## Object Definitions ```c +typedef struct _kpl_export { + POOL_HEADER(_kpl_export); + _Atomic int32_t ref_count; + kpl_buffer *name; + kpl_class *class; +} kpl_export; + typedef struct _kpl_native_namespace { POOL_HEADER(_kpl_native_namespace); kpl_buffer *name; - kpl_map *exports; - pthread_mutex_t mutex; + kpl_export *exports; } kpl_native_namespace; -``` -```c typedef struct _kpl_file_namespace { POOL_HEADER(_kpl_file_namespace); __Atomic int16_t children; uint16_t flags; + kpl_queue *parents; kpl_buffer *file_name, *file_string; - kpl_map *parents, *exports; + kpl_export *exports; // TODO AST - kpl_interface *interface; kpl_task *task; - pthread_mutex_t mutex; } kpl_file_namespace; -``` -```c typedef struct _kpl_string_namespace { + _Atomic int16_t children; kpl_buffer *string; // TODO AST - kpl_interface *interface; kpl_task *task; } kpl_string_namespace; ``` diff --git a/docs/application/queue.md b/docs/application/queue.md index 86c4009..21ec995 100644 --- a/docs/application/queue.md +++ b/docs/application/queue.md @@ -1,3 +1,17 @@ # Queue --- + +```c +typedef struct _kpl_queue_item { + POOL_HEADER(_kpl_queue_item); + kpl_interface *interface; + kpl_class class; +} kpl_queue_item; + +typedef struct _kpl_queue { + POOL_HEADER(_kpl_queue); + uint32_t length; + kpl_queue_item *head, *tail; +} kpl_queue; +``` diff --git a/docs/application/thread.md b/docs/application/thread.md index 4ee5688..56d8566 100644 --- a/docs/application/thread.md +++ b/docs/application/thread.md @@ -9,18 +9,14 @@ typedef struct _kpl_task kpl_task; typedef void kpl_task_fn(kpl_task *t); -#ifndef KPL_TASK_STATE_SIZE -#define KPL_TASK_STATE_SIZE 20 -#endif - typedef struct _kpl_task { POOL_HEADER(kpl_task); _Atomic bool join_ready; uint16_t worker_id; kpl_task_fn *fn; + kpl_tuple *state; kpl_interface *ret_interface; kpl_result ret; - kpl_class state[KPL_TASK_STATE_SIZE]; } kpl_task; typedef struct { @@ -43,6 +39,16 @@ pthread_cond_t async_cond; kpl_thread threads[KPL_MAX_THREADS]; ``` +## Task State + +```text +0 -> length +native : arguments +process : arguments, locals +closure : arguments, locals, closure function +iterator : arguments, locals, iterator functions, iterator function index +``` + ## Per Process Task Queue ## Asynchronous Task Queue diff --git a/docs/application/type.md b/docs/application/type.md index 4cc2fc8..eae1425 100644 --- a/docs/application/type.md +++ b/docs/application/type.md @@ -2,6 +2,6 @@ --- -## Object Definitions +## Allocation -## Allocator +## Object Definitions |
