MOS Source Code
Loading...
Searching...
No Matches
iterator.c File Reference
+ Include dependency graph for iterator.c:

Go to the source code of this file.

Macros

#define yield_range()
 
#define _IS_IN_RANGE   MOS_IN_RANGE(it->vaddr, it->start, it->end)
 

Functions

static void pagetable_iterator_start_current_range (pagetable_iter_t *it, pml5_t *pml5, pml4_t *pml4, pml3_t *pml3, pml2_t *pml2, pml1_t *pml1)
 
void pagetable_iter_init (pagetable_iter_t *it, pgd_t pgd, ptr_t vaddr, ptr_t end)
 Initialize a pagetable iterator.
 
pagetable_iter_range_tpagetable_iter_next (pagetable_iter_t *it)
 Get the next page table range.
 

Macro Definition Documentation

◆ yield_range

#define yield_range ( )
Value:
do \
{ \
it->range.vaddr_end = it->vaddr - 1; \
return &it->range; \
} while (0)

Definition at line 90 of file iterator.c.

Referenced by pagetable_iter_next().

◆ _IS_IN_RANGE

#define _IS_IN_RANGE   MOS_IN_RANGE(it->vaddr, it->start, it->end)

Referenced by pagetable_iter_next().

Function Documentation

◆ pagetable_iterator_start_current_range()

static void pagetable_iterator_start_current_range ( pagetable_iter_t * it,
pml5_t * pml5,
pml4_t * pml4,
pml3_t * pml3,
pml2_t * pml2,
pml1_t * pml1 )
static

Definition at line 13 of file iterator.c.

Referenced by pagetable_iter_next().

+ Here is the call graph for this function:

◆ pagetable_iter_init()

void pagetable_iter_init ( pagetable_iter_t * it,
pgd_t pgd,
ptr_t vaddr,
ptr_t end )

Initialize a pagetable iterator.

Parameters
itThe iterator to initialize.
pgdThe page directory to iterate.
vaddrThe virtual address to start iterating from.
endThe virtual address to stop iterating at.

Definition at line 82 of file iterator.c.

Referenced by mm_dump_pagetable(), and mmstat_sysfs_pagetable_show().

◆ pagetable_iter_next()

pagetable_iter_range_t * pagetable_iter_next ( pagetable_iter_t * it)

Get the next page table range.

Parameters
itThe iterator to get the next range from.
Returns
pagetable_iter_range_t*

Definition at line 97 of file iterator.c.

Referenced by mm_dump_pagetable(), and mmstat_sysfs_pagetable_show().

+ Here is the call graph for this function: