summaryrefslogtreecommitdiff
path: root/docs/application/namespace.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-25 15:27:38 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-25 15:27:38 -0400
commit88646efb1c2615e6d8ff0a2eae047a5ed2a31dd4 (patch)
treed47bb1d6578e1cf1c76502c766e802a60aac49a0 /docs/application/namespace.md
parent12716caccba32910fb603d72aa457b200fe79024 (diff)
all names will live on global trie
Diffstat (limited to 'docs/application/namespace.md')
-rw-r--r--docs/application/namespace.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/application/namespace.md b/docs/application/namespace.md
index cbf768d..7cb6a3c 100644
--- a/docs/application/namespace.md
+++ b/docs/application/namespace.md
@@ -25,10 +25,10 @@ typedef enum : uint8_t {
typedef struct _kpl_namespace_module {
KPL_SLAB_TREE_HEADER(struct _kpl_namespace_module);
kpl_type_ptr ast;
- kpl_name *name_tree;
kpl_buffer *module_name, *module_string;
+ kpl_task *_Atomic task;
kpl_export *export_tree;
- kpl_mutex mutex;
+ kpl_mutex export_mutex;
} kpl_namespace_module;
static kpl_namespace_module *namespace_module_tree;
@@ -37,9 +37,8 @@ kpl_mutex namespace_module_mutex;
typedef struct _kpl_namespace_string {
kpl_type_ptr ast;
- kpl_name *name_tree;
kpl_buffer *string;
- kpl_mutex mutex;
+ kpl_task *_Atomic task;
} kpl_namespace_string;
static kpl_namespace_string namespace_string
@@ -98,5 +97,6 @@ Since the native modules are loaded statically the `native_module_tree` becomes
### Import ``import`
1. Add find namespace task to the `namespace_module_mutex`, the namespace not existing is an error
-2. Add task to the namespaces `mutex`
-3. The task will resume the importer
+2. Add a get export task to the namespaces `export_mutex`
+3. The `export_mutex` will not start processing it's queue until the `task` field is `NULL`
+4. The importer will get a copy of the read only `export_tree`