WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Move the registration of the @releaseDomain watch so tha

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Move the registration of the @releaseDomain watch so that we avoid a watch
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Nov 2005 11:28:15 +0000
Delivery-date: Thu, 17 Nov 2005 11:29:40 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 8c736c042f727fb4d6c0471ed3ff6d60cb68964e
# Parent  3867d93d86f7bf962035f3fdcedfed50f8648a01
Move the registration of the @releaseDomain watch so that we avoid a watch
between the watch firing and the first call to refresh. 

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 3867d93d86f7 -r 8c736c042f72 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Wed Nov 16 14:25:22 2005
+++ b/tools/python/xen/xend/XendDomain.py       Wed Nov 16 14:27:11 2005
@@ -63,14 +63,19 @@
         self.domains = {}
         self.domains_lock = threading.RLock()
 
-        xswatch("@releaseDomain", self.onReleaseDomain)
-
         self.domains_lock.acquire()
         try:
             self._add_domain(
                 XendDomainInfo.recreate(self.xen_domains()[PRIV_DOMAIN],
                                         True))
             self.dom0_setup()
+
+            # This watch registration needs to be before the refresh call, so
+            # that we're sure that we haven't missed any releases, but inside
+            # the domains_lock, as we don't want the watch to fire until after
+            # the refresh call has completed.
+            xswatch("@releaseDomain", self.onReleaseDomain)
+            
             self.refresh(True)
         finally:
             self.domains_lock.release()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Move the registration of the @releaseDomain watch so that we avoid a watch, Xen patchbot -unstable <=