diff options
| author | nodist <kevin.comas.git@gmail.com> | 2026-06-16 12:42:41 -0400 |
|---|---|---|
| committer | nodist <kevin.comas.git@gmail.com> | 2026-06-16 12:42:41 -0400 |
| commit | 7964cf08ac807ac9e7b6d579a25321a23adc9139 (patch) | |
| tree | 807799f7c4dea85fca31e3532b0e06f71f0f32ea /docs/application/shared.md | |
| parent | e99f60fe8cdef48aad9aa6a1b360b600443ac659 (diff) | |
new layout by dependecy graph
Diffstat (limited to 'docs/application/shared.md')
| -rw-r--r-- | docs/application/shared.md | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/docs/application/shared.md b/docs/application/shared.md index b2760c5..95616c9 100644 --- a/docs/application/shared.md +++ b/docs/application/shared.md @@ -8,21 +8,9 @@ typedef struct _kpl_shared { KPL_SLAB_HEADER(_kpl_shared); void *data; - kpl_atomic_queue queue; - _Atomic uint32_t lock; + kpl_mutex mutex; bool mark; } kpl_shared; ``` -## Mutating - -1. Before adding to the `queue` do `value = lock++` -2. Add to the queue -3. If `value` is `0` the thread does an async schedule of the mutator task, otherwise the thread moves on - -### Mutator Task - -1. Get task from `queue` and run task -2. After task completion, do `value = --lock`, stop if `value` is `0`, otherwise repeat - ## Garbage Collection |
