summaryrefslogtreecommitdiffstats
path: root/src/include/elist.h
diff options
context:
space:
mode:
authorGreg Farnum <gregf@hq.newdream.net>2010-12-15 01:43:45 +0100
committerGreg Farnum <gregf@hq.newdream.net>2011-01-06 20:12:14 +0100
commitd14c7dd47df9dafdc0b223c8de833e75009533ff (patch)
tree515276f879e0f473b082598e9912f7866c911b1b /src/include/elist.h
parentlru: change control flow and an assert to keep purpose clearer. (diff)
downloadceph-d14c7dd47df9dafdc0b223c8de833e75009533ff.tar.xz
ceph-d14c7dd47df9dafdc0b223c8de833e75009533ff.zip
elist: add a clear_list function.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Diffstat (limited to 'src/include/elist.h')
-rw-r--r--src/include/elist.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/elist.h b/src/include/elist.h
index 553fd419de9..051978169a7 100644
--- a/src/include/elist.h
+++ b/src/include/elist.h
@@ -126,6 +126,11 @@ public:
_head._prev->remove_myself();
}
+ void clear_list() {
+ while (!empty())
+ pop_front();
+ }
+
enum mode_t {
MAGIC, CURRENT, CACHE_NEXT
};