Messages in this thread Patch in this message |  | | Date | Tue, 02 Dec 2025 19:37:36 +0000 | | Subject | [PATCH 12/46] rust: cpumask: add __rust_helper to helpers | | From | Alice Ryhl <> |
| |
This is needed to inline these helpers into Rust code.
Signed-off-by: Alice Ryhl <aliceryhl@google.com> --- Cc: Yury Norov <yury.norov@gmail.com> --- rust/helpers/cpumask.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c index eb10598a0242f31598d0c401e194dce194ac85bf..74b561f7bf6f112c22e6a3ddb266ac003b06f531 100644 --- a/rust/helpers/cpumask.c +++ b/rust/helpers/cpumask.c @@ -2,68 +2,74 @@ #include <linux/cpumask.h> -void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_set_cpu(unsigned int cpu, + struct cpumask *dstp) { cpumask_set_cpu(cpu, dstp); } -void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) +__rust_helper void rust_helper___cpumask_set_cpu(unsigned int cpu, + struct cpumask *dstp) { __cpumask_set_cpu(cpu, dstp); } -void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp) { cpumask_clear_cpu(cpu, dstp); } -void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp) +__rust_helper void rust_helper___cpumask_clear_cpu(int cpu, + struct cpumask *dstp) { __cpumask_clear_cpu(cpu, dstp); } -bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp) { return cpumask_test_cpu(cpu, srcp); } -void rust_helper_cpumask_setall(struct cpumask *dstp) +__rust_helper void rust_helper_cpumask_setall(struct cpumask *dstp) { cpumask_setall(dstp); } -bool rust_helper_cpumask_empty(struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_empty(struct cpumask *srcp) { return cpumask_empty(srcp); } -bool rust_helper_cpumask_full(struct cpumask *srcp) +__rust_helper bool rust_helper_cpumask_full(struct cpumask *srcp) { return cpumask_full(srcp); } -unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) +__rust_helper unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) { return cpumask_weight(srcp); } -void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp) +__rust_helper void rust_helper_cpumask_copy(struct cpumask *dstp, + const struct cpumask *srcp) { cpumask_copy(dstp, srcp); } -bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +__rust_helper bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, + gfp_t flags) { return alloc_cpumask_var(mask, flags); } -bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) +__rust_helper bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, + gfp_t flags) { return zalloc_cpumask_var(mask, flags); } #ifndef CONFIG_CPUMASK_OFFSTACK -void rust_helper_free_cpumask_var(cpumask_var_t mask) +__rust_helper void rust_helper_free_cpumask_var(cpumask_var_t mask) { free_cpumask_var(mask); } -- 2.52.0.158.g65b55ccf14-goog
|  |