summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-09-25 15:53:38 -0700
committerGabe Black <gabeblack@google.com>2017-09-26 21:17:34 +0000
commit2a02e3d30de151518f6b769c59b4585b817af22c (patch)
treeb8584743bc727ab6a35b65666504ef38baf74508 /src
parent4e5a1fafb7dd5c5cbfa060c9543a498bc56e8a9e (diff)
downloadgem5-2a02e3d30de151518f6b769c59b4585b817af22c.tar.xz
sim: Add a NullSimObject.descendants function.
Null simobjects don't have any descendants. Change-Id: Ia43a99056709f422c9c817c017912d23d689fb1e Reviewed-on: https://gem5-review.googlesource.com/4844 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/python/m5/params.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 6c3c47e95..f9412d70e 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -1716,6 +1716,10 @@ class NullSimObject(object):
def clear_parent(self, old_parent):
pass
+ def descendants(self):
+ return
+ yield None
+
def __str__(self):
return 'Null'