1.1 --- a/libfsserver/lib/pages/page_queue.cc Sat May 28 23:52:48 2022 +0200
1.2 +++ b/libfsserver/lib/pages/page_queue.cc Sun May 29 00:31:29 2022 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * A page queue abstraction.
1.6 *
1.7 - * Copyright (C) 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -27,8 +27,6 @@
1.13 {
1.14 }
1.15
1.16 -
1.17 -
1.18 void PageQueue::discard(Queue &queue, Memory *memory)
1.19 {
1.20 while (!queue.empty())
1.21 @@ -41,26 +39,4 @@
1.22 }
1.23 }
1.24
1.25 -bool PageQueue::remove(Queue &queue, Positions &positions, PageOwner *owner, Flexpage *flexpage)
1.26 -{
1.27 - Positions::iterator position = positions.find(flexpage);
1.28 -
1.29 - if (position == positions.end())
1.30 - return false;
1.31 -
1.32 - /* The found owner may be different from the requesting owner or even NULL
1.33 - if another owner has acquired and then purged its pages. Such a purged
1.34 - flexpage is not immediately usable, however. */
1.35 -
1.36 - Queue::iterator entry = position->second;
1.37 -
1.38 - if ((entry->owner == NULL) || (entry->owner != owner))
1.39 - return false;
1.40 -
1.41 - queue.erase(entry);
1.42 - positions.erase(position);
1.43 -
1.44 - return true;
1.45 -}
1.46 -
1.47 // vim: tabstop=4 expandtab shiftwidth=4