summaryrefslogtreecommitdiff
path: root/docs/application
diff options
context:
space:
mode:
Diffstat (limited to 'docs/application')
-rw-r--r--docs/application/gc.md12
-rw-r--r--docs/application/index.md1
-rw-r--r--docs/application/type.md12
3 files changed, 24 insertions, 1 deletions
diff --git a/docs/application/gc.md b/docs/application/gc.md
new file mode 100644
index 0000000..7353db9
--- /dev/null
+++ b/docs/application/gc.md
@@ -0,0 +1,12 @@
+# Garbage Collection
+
+---
+
+## Object Definition
+
+```c
+typedef struct _kpl_gc_count {
+ _Atomic size_t ref_count;
+ kpl_any any;
+} kpl_gc_count;
+```
diff --git a/docs/application/index.md b/docs/application/index.md
index 68bd1a1..f4a013b 100644
--- a/docs/application/index.md
+++ b/docs/application/index.md
@@ -15,6 +15,7 @@
* ##### [Pool](./pool.md)
* ##### [Thread](./thread.md)
* ##### [Io](./io.md)
+* ##### [Gc](./gc.md)
* ##### [Tuple](./tuple.md)
* ##### [Buffer](./buffer.md)
* ##### [Map](./map.md)
diff --git a/docs/application/type.md b/docs/application/type.md
index 77c567d..a89302e 100644
--- a/docs/application/type.md
+++ b/docs/application/type.md
@@ -15,16 +15,26 @@ typedef struct {
static const kpl_type_ptr kpl_type_ptr_null = { UINT16_MAX, UINT16_MAX };
-typedef enum : uint16_t {
+typedef enum : uint8_t {
// ...
} kpl_type_template;
+typedef enum : uint8_t {
+ CONST = 1 << 0
+ EMPTY = 1 << 1,
+ REF = 1 << 2,
+ SHARED = 1 << 3,
+ COUTING = 1 << 4,
+ TRACING = 1 << 5
+} kpl_type_flags;
+
typedef union {
// ...
} kpl_type_body;
typedef struct {
kpl_type_template template;
+ kpl_type_flags flags;
_Atomic unt16_t ref_count;
kpl_type_ptr self, prev, next, parent;
kpl_type_body body;