Skip to content

Commit

Permalink
Merge branch 'rust-next' of https://github.com/Rust-for-Linux/linux.git
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Rothwell committed Jul 21, 2023
2 parents 19b405d + 341faf2 commit 18eea17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions rust/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@
*
* All symbols are exported as GPL-only to guarantee no GPL-only feature is
* accidentally exposed.
*
* Sorted alphabetically.
*/

#include <kunit/test-bug.h>
#include <linux/bug.h>
#include <linux/build_bug.h>
#include <linux/err.h>
#include <linux/errname.h>
#include <linux/refcount.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/refcount.h>
#include <linux/sched/signal.h>
#include <linux/spinlock.h>
#include <linux/wait.h>

__noreturn void rust_helper_BUG(void)
Expand Down
6 changes: 3 additions & 3 deletions rust/kernel/sync/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ pub unsafe trait Backend {

/// A mutual exclusion primitive.
///
/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock backend
/// specified as the generic parameter `B`.
/// Exposes one of the kernel locking primitives. Which one is exposed depends on the lock
/// [`Backend`] specified as the generic parameter `B`.
#[pin_data]
pub struct Lock<T: ?Sized, B: Backend> {
/// The kernel lock object.
Expand Down Expand Up @@ -126,7 +126,7 @@ impl<T: ?Sized, B: Backend> Lock<T, B> {

/// A lock guard.
///
/// Allows mutual exclusion primitives that implement the `Backend` trait to automatically unlock
/// Allows mutual exclusion primitives that implement the [`Backend`] trait to automatically unlock
/// when a guard goes out of scope. It also provides a safe and convenient way to access the data
/// protected by the lock.
#[must_use = "the lock unlocks immediately when the guard is unused"]
Expand Down

0 comments on commit 18eea17

Please sign in to comment.