diff options
author | Andreas Hindborg <[email protected]> | 2024-08-15 10:30:26 +0000 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2024-08-18 23:34:26 +0200 |
commit | 876346536c1b59a5b1b5e44477b1b3ece77647fd (patch) | |
tree | 728446059604408105d5daafebcf7efd9b65f9d3 /rust/helpers/mutex.c | |
parent | f1385dc670fe66860bcec5dcba215364bf71b807 (diff) |
rust: kbuild: split up helpers.c
This patch splits up the rust helpers C file. When rebasing patch sets on
upstream linux, merge conflicts in helpers.c is common and time consuming
[1]. Thus, split the file so that each kernel component can live in a
separate file.
This patch lists helper files explicitly and thus conflicts in the file
list is still likely. However, they should be more simple to resolve than
the conflicts usually seen in helpers.c.
[ Removed `README.md` and undeleted the original comment since now,
in v3 of the series, we have a `helpers.c` again; which also allows
us to keep the "Sorted alphabetically" line and makes the diff easier.
In addition, updated the Documentation/ mentions of the file, reworded
title and removed blank lines at the end of `page.c`. - Miguel ]
Link: https://rust-for-linux.zulipchat.com/#narrow/stream/288089-General/topic/Splitting.20up.20helpers.2Ec/near/426694012 [1]
Signed-off-by: Andreas Hindborg <[email protected]>
Reviewed-by: Gary Guo <[email protected]>
Acked-by: Dirk Behme <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Reviewed-by: Benno Lossin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/helpers/mutex.c')
-rw-r--r-- | rust/helpers/mutex.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/helpers/mutex.c b/rust/helpers/mutex.c new file mode 100644 index 000000000000..29fd141c387d --- /dev/null +++ b/rust/helpers/mutex.c @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/export.h> +#include <linux/mutex.h> + +void rust_helper_mutex_lock(struct mutex *lock) +{ + mutex_lock(lock); +} +EXPORT_SYMBOL_GPL(rust_helper_mutex_lock); |