mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
kernel/vm: Rename _FreePageRange "discarded" argument to "freedPages".
Clarifies things. No functional change.
This commit is contained in:
parent
47dbff983a
commit
d4d55c1fbb
@ -220,7 +220,7 @@ private:
|
||||
void _RemoveConsumer(VMCache* consumer);
|
||||
|
||||
bool _FreePageRange(VMCachePagesTree::Iterator it,
|
||||
page_num_t* toPage, page_num_t* discarded);
|
||||
page_num_t* toPage, page_num_t* freedPages);
|
||||
|
||||
private:
|
||||
int32 fRefCount;
|
||||
|
@ -1106,7 +1106,7 @@ VMCache::SetMinimalCommitment(off_t commitment, int priority)
|
||||
|
||||
bool
|
||||
VMCache::_FreePageRange(VMCachePagesTree::Iterator it,
|
||||
page_num_t* toPage = NULL, page_num_t* discarded = NULL)
|
||||
page_num_t* toPage = NULL, page_num_t* freedPages = NULL)
|
||||
{
|
||||
for (vm_page* page = it.Next();
|
||||
page != NULL && (toPage == NULL || page->cache_offset < *toPage);
|
||||
@ -1118,8 +1118,8 @@ VMCache::_FreePageRange(VMCachePagesTree::Iterator it,
|
||||
// as we might cause a deadlock this way
|
||||
page->busy_writing = false;
|
||||
// this will notify the writer to free the page
|
||||
if (discarded != NULL)
|
||||
(*discarded)++;
|
||||
if (freedPages != NULL)
|
||||
(*freedPages)++;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1140,8 +1140,8 @@ VMCache::_FreePageRange(VMCachePagesTree::Iterator it,
|
||||
// removing the current node is safe.
|
||||
|
||||
vm_page_free(this, page);
|
||||
if (discarded != NULL)
|
||||
(*discarded)++;
|
||||
if (freedPages != NULL)
|
||||
(*freedPages)++;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user