debuggers.hg

view tools/python/xen/xend/xenstore/xsutil.py @ 0:7d21f7218375

Exact replica of unstable on 051908 + README-this
author Mukesh Rathor
date Mon May 19 15:34:57 2008 -0700 (2008-05-19)
parents
children
line source
1 # Copyright (C) 2005 Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
3 # This file is subject to the terms and conditions of the GNU General
4 # Public License. See the file "COPYING" in the main directory of
5 # this archive for more details.
7 import threading
8 import xen.lowlevel.xs
10 xs_lock = threading.Lock()
11 xs_handle = None
13 def xshandle():
14 global xs_handle, xs_lock
15 if not xs_handle:
16 xs_lock.acquire()
17 if not xs_handle:
18 xs_handle = xen.lowlevel.xs.xs()
19 xs_lock.release()
20 return xs_handle
22 def IntroduceDomain(domid, page, port):
23 return xshandle().introduce_domain(domid, page, port)
25 def SetTarget(domid, target):
26 return xshandle().set_target(domid, target)
28 def GetDomainPath(domid):
29 return xshandle().get_domain_path(domid)
31 def ResumeDomain(domid):
32 return xshandle().resume_domain(domid)