Skip to content

Commit a7e7351

Browse files
committed
rust: cpumask: Add few more helpers
Add few more cpumask helpers that are required by the Rust abstraction. Signed-off-by: Viresh Kumar <[email protected]> Acked-by: Yury Norov [NVIDIA] <[email protected]>
1 parent f526a12 commit a7e7351

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

rust/helpers/cpumask.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,41 @@ void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
77
cpumask_set_cpu(cpu, dstp);
88
}
99

10+
void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
11+
{
12+
__cpumask_set_cpu(cpu, dstp);
13+
}
14+
1015
void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
1116
{
1217
cpumask_clear_cpu(cpu, dstp);
1318
}
1419

20+
void rust_helper___cpumask_clear_cpu(int cpu, struct cpumask *dstp)
21+
{
22+
__cpumask_clear_cpu(cpu, dstp);
23+
}
24+
25+
bool rust_helper_cpumask_test_cpu(int cpu, struct cpumask *srcp)
26+
{
27+
return cpumask_test_cpu(cpu, srcp);
28+
}
29+
1530
void rust_helper_cpumask_setall(struct cpumask *dstp)
1631
{
1732
cpumask_setall(dstp);
1833
}
1934

35+
bool rust_helper_cpumask_empty(struct cpumask *srcp)
36+
{
37+
return cpumask_empty(srcp);
38+
}
39+
40+
bool rust_helper_cpumask_full(struct cpumask *srcp)
41+
{
42+
return cpumask_full(srcp);
43+
}
44+
2045
unsigned int rust_helper_cpumask_weight(struct cpumask *srcp)
2146
{
2247
return cpumask_weight(srcp);

0 commit comments

Comments
 (0)