1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Style changes to pmap_extract().

This commit is contained in:
Alan Cox 2004-07-06 02:33:11 +00:00
parent 9bd86a9861
commit c9a217d2ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131666
2 changed files with 6 additions and 10 deletions

View File

@ -760,15 +760,13 @@ pmap_is_current(pmap_t pmap)
* with the given map/virtual_address pair. * with the given map/virtual_address pair.
*/ */
vm_paddr_t vm_paddr_t
pmap_extract(pmap, va) pmap_extract(pmap_t pmap, vm_offset_t va)
register pmap_t pmap;
vm_offset_t va;
{ {
vm_paddr_t rtval; vm_paddr_t rtval;
pt_entry_t *pte; pt_entry_t *pte;
pd_entry_t pde, *pdep; pd_entry_t pde, *pdep;
if (pmap == 0) if (pmap == NULL)
return 0; return 0;
PMAP_LOCK(pmap); PMAP_LOCK(pmap);
pdep = pmap_pde(pmap, va); pdep = pmap_pde(pmap, va);
@ -781,7 +779,7 @@ pmap_extract(pmap, va)
return rtval; return rtval;
} }
pte = pmap_pte(pmap, va); pte = pmap_pte(pmap, va);
rtval = ((*pte & PG_FRAME) | (va & PAGE_MASK)); rtval = (*pte & PG_FRAME) | (va & PAGE_MASK);
PMAP_UNLOCK(pmap); PMAP_UNLOCK(pmap);
return rtval; return rtval;
} }

View File

@ -821,15 +821,13 @@ pmap_pte_quick(pmap_t pmap, vm_offset_t va)
* with the given map/virtual_address pair. * with the given map/virtual_address pair.
*/ */
vm_paddr_t vm_paddr_t
pmap_extract(pmap, va) pmap_extract(pmap_t pmap, vm_offset_t va)
register pmap_t pmap;
vm_offset_t va;
{ {
vm_paddr_t rtval; vm_paddr_t rtval;
pt_entry_t *pte; pt_entry_t *pte;
pd_entry_t pde; pd_entry_t pde;
if (pmap == 0) if (pmap == NULL)
return 0; return 0;
PMAP_LOCK(pmap); PMAP_LOCK(pmap);
pde = pmap->pm_pdir[va >> PDRSHIFT]; pde = pmap->pm_pdir[va >> PDRSHIFT];
@ -840,7 +838,7 @@ pmap_extract(pmap, va)
return rtval; return rtval;
} }
pte = pmap_pte(pmap, va); pte = pmap_pte(pmap, va);
rtval = ((*pte & PG_FRAME) | (va & PAGE_MASK)); rtval = (*pte & PG_FRAME) | (va & PAGE_MASK);
PMAP_UNLOCK(pmap); PMAP_UNLOCK(pmap);
return rtval; return rtval;
} }