logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

pmap_extract, pmap_extract_and_hold — map a virtual address to a physical page

Authors

       The pmap_extract_and_hold() function was implemented by Alan L. Cox <alc@imimic.com>.  This  manual  page
       was written by Bruce M Simpson <bms@spc.org>.

Debian                                            July 21, 2003                                  PMAP_EXTRACT(9)

Description

       The  pmap_extract()  function  maps a virtual address to a physical page.  In certain situations, callers
       may use pmap_extract_and_hold() instead, to ensure that the returned page is held.

       The pmap_extract_and_hold() function maps a virtual address to a physical page, and atomically holds  the
       returned page for use by the caller, only if the mapping permits the given page protection.

Implementation Notes

       Currently, the page protection requested by the caller is not verified.

Name

       pmap_extract, pmap_extract_and_hold — map a virtual address to a physical page

Return Values

       The  pmap_extract() function will return the physical page address associated with the virtual address va
       inside the physical map pmap.  If the mapping does not exist, or if the pmap parameter is NULL, then NULL
       will be returned.

       The pmap_extract_and_hold() function will return the physical page address associated  with  the  virtual
       address  va inside the physical map pmap.  If the mapping does not exist, the result is a no-op, and NULL
       will be returned.

See Also

mutex(9), pmap(9)

Synopsis

#include<sys/param.h>#include<vm/vm.h>#include<vm/pmap.h>vm_paddr_tpmap_extract(pmap_tpmap, vm_offset_tva);

       vm_paddr_tpmap_extract_and_hold(pmap_tpmap, vm_offset_tva, vm_prot_tprot);

See Also