Skip to content

Commit

Permalink
locking/Documentation: Fix grammar in percpu-rw-semaphore.rst
Browse files Browse the repository at this point in the history
s/'is initialized'/'is initialized with'

Signed-off-by: Xiu Jianfeng <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Xiu Jianfeng authored and Ingo Molnar committed Nov 13, 2024
1 parent 9a884bd commit 3b49a34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/locking/percpu-rw-semaphore.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ writing is very expensive, it calls synchronize_rcu() that can take
hundreds of milliseconds.

The lock is declared with "struct percpu_rw_semaphore" type.
The lock is initialized percpu_init_rwsem, it returns 0 on success and
-ENOMEM on allocation failure.
The lock is initialized with percpu_init_rwsem, it returns 0 on success
and -ENOMEM on allocation failure.
The lock must be freed with percpu_free_rwsem to avoid memory leak.

The lock is locked for read with percpu_down_read, percpu_up_read and
Expand Down

0 comments on commit 3b49a34

Please sign in to comment.