Commit b66627fc authored by Maged Michael's avatar Maged Michael Committed by Facebook GitHub Bot

HazptrDomain: Remove unused data members and function

Summary:
Remove unused HazptrDomain data members unprotected_ and children_ and the function reclaim_unprotected_safe.

The data members and function were used before the change in October 2020 that eliminated the nesting of synchronous reclamation within asynchronous reclamation.

Reviewed By: yfeldblum

Differential Revision: D29017460

fbshipit-source-id: 645a61aedc801cb3eb14a4c3a085fea8b8422f1e
parent 99893da2
...@@ -129,8 +129,6 @@ class hazptr_domain { ...@@ -129,8 +129,6 @@ class hazptr_domain {
RetiredList untagged_; RetiredList untagged_;
RetiredList tagged_[kNumShards]; RetiredList tagged_[kNumShards];
Atom<int> count_{0}; Atom<int> count_{0};
Obj* unprotected_; // List of unprotected objects being reclaimed
ObjList children_; // Children of unprotected objects being reclaimed
Atom<uint64_t> due_time_{0}; Atom<uint64_t> due_time_{0};
Atom<ExecFn> exec_fn_{nullptr}; Atom<ExecFn> exec_fn_{nullptr};
Atom<int> exec_backlog_{0}; Atom<int> exec_backlog_{0};
...@@ -432,7 +430,7 @@ class hazptr_domain { ...@@ -432,7 +430,7 @@ class hazptr_domain {
}); });
ObjList children; ObjList children;
int count = nomatch.count(); int count = nomatch.count();
reclaim_unprotected_unsafe(nomatch.head(), children); reclaim_unprotected(nomatch.head(), children);
count -= children.count(); count -= children.count();
match.splice(children); match.splice(children);
List l(match.head(), match.tail()); List l(match.head(), match.tail());
...@@ -490,17 +488,8 @@ class hazptr_domain { ...@@ -490,17 +488,8 @@ class hazptr_domain {
} }
} }
/** reclaim_unprotected_safe */ /** reclaim_unprotected */
void reclaim_unprotected_safe() { void reclaim_unprotected(Obj* obj, ObjList& children) {
while (unprotected_) {
auto obj = unprotected_;
unprotected_ = obj->next();
(*(obj->reclaim()))(obj, children_);
}
}
/** reclaim_unprotected_unsafe */
void reclaim_unprotected_unsafe(Obj* obj, ObjList& children) {
while (obj) { while (obj) {
auto next = obj->next(); auto next = obj->next();
(*(obj->reclaim()))(obj, children); (*(obj->reclaim()))(obj, children);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment