| 1 | |
| 2 |
|
| 3 | #include <linux/mm.h>
|
| 4 | #include <linux/sched/mm.h>
|
| 5 |
|
| 6 | __rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
|
| 7 | {
|
| 8 | mmgrab(mm);
|
| 9 | }
|
| 10 |
|
| 11 | __rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
|
| 12 | {
|
| 13 | mmdrop(mm);
|
| 14 | }
|
| 15 |
|
| 16 | __rust_helper void rust_helper_mmget(struct mm_struct *mm)
|
| 17 | {
|
| 18 | mmget(mm);
|
| 19 | }
|
| 20 |
|
| 21 | __rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm)
|
| 22 | {
|
| 23 | return mmget_not_zero(mm);
|
| 24 | }
|
| 25 |
|
| 26 | __rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm)
|
| 27 | {
|
| 28 | mmap_read_lock(mm);
|
| 29 | }
|
| 30 |
|
| 31 | __rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
|
| 32 | {
|
| 33 | return mmap_read_trylock(mm);
|
| 34 | }
|
| 35 |
|
| 36 | __rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm)
|
| 37 | {
|
| 38 | mmap_read_unlock(mm);
|
| 39 | }
|
| 40 |
|
| 41 | __rust_helper struct vm_area_struct *
|
| 42 | rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr)
|
| 43 | {
|
| 44 | return vma_lookup(mm, addr);
|
| 45 | }
|
| 46 |
|
| 47 | __rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma)
|
| 48 | {
|
| 49 | vma_end_read(vma);
|
| 50 | }
|