diff options
author | Greg Farnum <gregf@hq.newdream.net> | 2010-12-15 01:43:45 +0100 |
---|---|---|
committer | Greg Farnum <gregf@hq.newdream.net> | 2011-01-06 20:12:14 +0100 |
commit | d14c7dd47df9dafdc0b223c8de833e75009533ff (patch) | |
tree | 515276f879e0f473b082598e9912f7866c911b1b /src/include/elist.h | |
parent | lru: change control flow and an assert to keep purpose clearer. (diff) | |
download | ceph-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.h | 5 |
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 }; |