debuggers.hg
changeset 6697:c9e1ddf85324
Trigger domain cleanup on @releaseDomain watch-event instead of domain exc. virq.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author | cl349@firebug.cl.cam.ac.uk |
---|---|
date | Wed Sep 07 13:41:49 2005 +0000 (2005-09-07) |
parents | 639a36483fee |
children | 652bd7876153 |
files | tools/python/xen/xend/XendDomain.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomain.py Wed Sep 07 13:40:06 2005 +0000 1.2 +++ b/tools/python/xen/xend/XendDomain.py Wed Sep 07 13:41:49 2005 +0000 1.3 @@ -67,7 +67,7 @@ class XendDomain: 1.4 xroot.add_component("xen.xend.XendDomain", self) 1.5 self.domains = XendDomainDict() 1.6 self.dbmap = DBMap(db=XenNode("/domain")) 1.7 - eserver.subscribe('xend.virq', self.onVirq) 1.8 + self.watchReleaseDomain() 1.9 self.initial_refresh() 1.10 1.11 def list(self): 1.12 @@ -95,11 +95,13 @@ class XendDomain: 1.13 doms = self.list_sorted() 1.14 return map(lambda x: x.name, doms) 1.15 1.16 - def onVirq(self, event, val): 1.17 - """Event handler for virq. 1.18 - """ 1.19 + def onReleaseDomain(self): 1.20 self.refresh(cleanup=True) 1.21 1.22 + def watchReleaseDomain(self): 1.23 + from xen.xend.xenstore.xswatch import xswatch 1.24 + self.releaseDomain = xswatch("@releaseDomain", self.onReleaseDomain) 1.25 + 1.26 def xen_domains(self): 1.27 """Get table of domains indexed by id from xc. 1.28 """