class VMPLCursor
Defined at line 702 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
Cursor that can be used for iterating over contiguous blocks of entries in a page list. The
underlying page list must not have any entries removed while using this cursor, as the cursor
retains iterators into the page list. It is, however, safe to insert new entries.
The cursor can be used to iterate over empty contiguous slots, however iteration will always
cease if entries are not contiguous.
Public Methods
void VMPLCursor ()
Defined at line 704 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
VmPageOrMarkerRef current_ref ()
See VMPLCursor::current.
Defined at line 707 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
const VmPageOrMarker * current ()
Retrieve the current VmPageOrMarker pointed at by the cursor. This will be a nullptr if the
cursor is no longer valid. The slot pointed at may itself be empty.
Note that it is up to the caller to know the offset, which it can track by remembering how
many |step|s it has done.
Defined at line 719 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
void step ()
Move the cursor to the next entry. The next entry can then be retrieved by calling |current|,
and if there is no next entry then current will return a nullptr.
Defined at line 729 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
template <typename F>
zx_status_t ForEveryContiguous (F func)
Calls the provided callback of type [](const VmPageOrMarker*)->zx_status_t on every entry as
long as they are contiguous. This is equivalent a loop calling |step| and |current|, but can
produce more optimal code gen with the internal loop.
The callback can return ZX_ERR_NEXT to continue, ZX_ERR_STOP to cease iteration gracefully, or
any other status to terminate with that status code.
Defined at line 744 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
uint64_t offset ()
Returns the offset of the |current| position of the cursor. This is invalid to call if
|current| is returning a nullptr.
Defined at line 764 of file ../../zircon/kernel/vm/include/vm/vm_page_list.h
Friends
class VmPageList