summaryrefslogtreecommitdiff
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2024-12-22 12:43:31 +0100
committerPeter Zijlstra <peterz@infradead.org>2024-12-22 12:43:31 +0100
commit630a9370164c231e9e81ec66256fc3351266dcac (patch)
treeeff72fb933548d8e8cda31d2f9d2a4691c14e122 /rust/helpers/mutex.c
parentabfdccd6af2b071951633e57d6322c46a1ea791f (diff)
parentfbd7a5a0359bc770e898d918d84977ea61163aad (diff)
Merge tag 'lockdep-for-tip.20241220' of git://git.kernel.org/pub/scm/linux/kernel/git/boqun/linux into locking/core
Lockdep changes for v6.14: - Use swap() macro in the ww_mutex test. - Minor fixes and documentation for lockdep configs on internal data structure sizes. - Some "-Wunused-function" warning fixes for Clang. Rust locking changes for v6.14: - Add Rust locking files into LOCKING PRIMITIVES maintainer entry. - Add `Lock<(), ..>::from_raw()` function to support abstraction on low level locking. - Expose `Guard::new()` for public usage and add type alias for spinlock and mutex guards. - Add lockdep checking when creating a new lock `Guard`.
Diffstat (limited to 'rust/helpers/mutex.c')
-rw-r--r--rust/helpers/mutex.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rust/helpers/mutex.c b/rust/helpers/mutex.c
index 7e00680958ef1..06575553eda5c 100644
--- a/rust/helpers/mutex.c
+++ b/rust/helpers/mutex.c
@@ -12,3 +12,8 @@ void rust_helper___mutex_init(struct mutex *mutex, const char *name,
{
__mutex_init(mutex, name, key);
}
+
+void rust_helper_mutex_assert_is_held(struct mutex *mutex)
+{
+ lockdep_assert_held(mutex);
+}