Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: cpumask: add __rust_helper to helpers

This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>

authored by

Alice Ryhl and committed by
Yury Norov (NVIDIA)
b4f1ffd6 8618307b

+13
+13
rust/helpers/cpumask.c
··· 2 2 3 3 #include <linux/cpumask.h> 4 4 5 + __rust_helper 5 6 void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) 6 7 { 7 8 cpumask_set_cpu(cpu, dstp); 8 9 } 9 10 11 + __rust_helper 10 12 void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp) 11 13 { 12 14 __cpumask_set_cpu(cpu, dstp); 13 15 } 14 16 17 + __rust_helper 15 18 void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp) 16 19 { 17 20 cpumask_clear_cpu(cpu, dstp); 18 21 } 19 22 23 + __rust_helper 20 24 void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp) 21 25 { 22 26 __cpumask_clear_cpu(cpu, dstp); 23 27 } 24 28 29 + __rust_helper 25 30 bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp) 26 31 { 27 32 return cpumask_test_cpu(cpu, srcp); 28 33 } 29 34 35 + __rust_helper 30 36 void rust_helper_cpumask_setall(struct cpumask *dstp) 31 37 { 32 38 cpumask_setall(dstp); 33 39 } 34 40 41 + __rust_helper 35 42 bool rust_helper_cpumask_empty(struct cpumask *srcp) 36 43 { 37 44 return cpumask_empty(srcp); 38 45 } 39 46 47 + __rust_helper 40 48 bool rust_helper_cpumask_full(struct cpumask *srcp) 41 49 { 42 50 return cpumask_full(srcp); 43 51 } 44 52 53 + __rust_helper 45 54 unsigned int rust_helper_cpumask_weight(struct cpumask *srcp) 46 55 { 47 56 return cpumask_weight(srcp); 48 57 } 49 58 59 + __rust_helper 50 60 void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp) 51 61 { 52 62 cpumask_copy(dstp, srcp); 53 63 } 54 64 65 + __rust_helper 55 66 bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) 56 67 { 57 68 return alloc_cpumask_var(mask, flags); 58 69 } 59 70 71 + __rust_helper 60 72 bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags) 61 73 { 62 74 return zalloc_cpumask_var(mask, flags); 63 75 } 64 76 65 77 #ifndef CONFIG_CPUMASK_OFFSTACK 78 + __rust_helper 66 79 void rust_helper_free_cpumask_var(cpumask_var_t mask) 67 80 { 68 81 free_cpumask_var(mask);