diff options
Diffstat (limited to 'docs/application/mutex.md')
| -rw-r--r-- | docs/application/mutex.md | 3 |
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 |
