summaryrefslogtreecommitdiff
path: root/docs/application/mutex.md
diff options
context:
space:
mode:
authornodist <kevin.comas.git@gmail.com>2026-06-17 14:24:51 -0400
committernodist <kevin.comas.git@gmail.com>2026-06-17 14:24:51 -0400
commit1ccb3c92a4c074a12550c584d3651ace2d7c0131 (patch)
tree3288fc8f7b6bb9e31fe43cfbd3d5e18e61d0207e /docs/application/mutex.md
parent7964cf08ac807ac9e7b6d579a25321a23adc9139 (diff)
qualifiers as %
Diffstat (limited to 'docs/application/mutex.md')
-rw-r--r--docs/application/mutex.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/application/mutex.md b/docs/application/mutex.md
index 999f5dc..e1b15c7 100644
--- a/docs/application/mutex.md
+++ b/docs/application/mutex.md
@@ -6,7 +6,7 @@
```c
typedef struct {
- kpl_atomic_queue queue;
+ kpl_task_queue queue;
_Atomic int32_t lock;
} kpl_mutex;
```
@@ -20,4 +20,5 @@ typedef struct {
### Mutex Task
1. Get task from `queue` and run task
+ * Use spinlock with `pasue`, the `lock` will be set before the task is added to the `queue`
2. After task completion, do `value = --lock`, stop if `value` is `0`, otherwise repeat