From ec3fa13996a07c505a0dc7b76558e0dc44e5ac55 Mon Sep 17 00:00:00 2001 From: Fupan Li Date: Wed, 29 Nov 2017 11:58:37 +0800 Subject: [PATCH] spinlock: fix the wrong function name of arch_spin_lock It should be arch_spin_unlock instead of arch_spin_lock. Signed-off-by: Fupan Li --- SyncPrim/sync-1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SyncPrim/sync-1.md b/SyncPrim/sync-1.md index 76ea46f..b58e9c6 100644 --- a/SyncPrim/sync-1.md +++ b/SyncPrim/sync-1.md @@ -373,7 +373,7 @@ If one process held a lock and a second process started to execute the `arch_spi and the next iteration of the loop will be started. If these values will be equal, this means that the process which held this lock, released this lock and the next process may acquire the lock. -The `spin_unlock` operation goes through the all macros/function as `spin_lock`, of course with `unlock` prefix. In the end the `arch_spin_unlock` function will be called. If we will look at the implementation of the `arch_spin_lock` function, we will see that it increases `head` of the `lock tickets` list: +The `spin_unlock` operation goes through the all macros/function as `spin_lock`, of course with `unlock` prefix. In the end the `arch_spin_unlock` function will be called. If we will look at the implementation of the `arch_spin_unlock` function, we will see that it increases `head` of the `lock tickets` list: ```C __add(&lock->tickets.head, TICKET_LOCK_INC, UNLOCK_LOCK_PREFIX);