MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vm_page_prev

Function vm_page_prev

freebsd/vm/vm_page.c:1811–1823  ·  view source on GitHub ↗

* Returns the given page's predecessor (by pindex) within the object if it is * resident; if none is found, NULL is returned. * * The object must be locked. */

Source from the content-addressed store, hash-verified

1809 * The object must be locked.
1810 */
1811vm_page_t
1812vm_page_prev(vm_page_t m)
1813{
1814 vm_page_t prev;
1815
1816 VM_OBJECT_ASSERT_LOCKED(m->object);
1817 if ((prev = TAILQ_PREV(m, pglist, listq)) != NULL) {
1818 MPASS(prev->object == m->object);
1819 if (prev->pindex != m->pindex - 1)
1820 prev = NULL;
1821 }
1822 return (prev);
1823}
1824
1825/*
1826 * Uses the page mnew as a replacement for an existing page at index

Callers 2

vm_pageout_clusterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected