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