소스 검색

Update SyncPrim/linux-sync-2.md

Fix description error of __raw_cmpxchg
salmon 4 년 전
부모
커밋
39047db890
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      SyncPrim/linux-sync-2.md

+ 1 - 1
SyncPrim/linux-sync-2.md

@@ -244,7 +244,7 @@ Looks pretty easy, except for the `queued_spin_lock_slowpath` function. We see t
 })
 })
 ```
 ```
 
 
-which compares the `old` with the value pointed to by `ptr`.  If they differ, it stores the `new` in the memory location which is pointed by the `ptr` and returns the initial value in this memory location.
+which compares the `old` with the value pointed to by `ptr`.  If they are equal, it stores the `new` in the memory location which is pointed by the `ptr` and returns the initial value in this memory location.
 
 
 Let's back to the `queued_spin_lock` function. Assuming that we are the first one who tried to acquire the lock, the `val` will be zero and we will return from the `queued_spin_lock` function:
 Let's back to the `queued_spin_lock` function. Assuming that we are the first one who tried to acquire the lock, the `val` will be zero and we will return from the `queued_spin_lock` function: