mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
Remove python virq code.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
76c86a2924
commit
940e39c97f
2 files changed
+1
-33
No files matched your search
@@ -316,10 +316,6 @@ class Daemon:
|
||||
self.channelF = channel.channelFactory()
|
||||
|
||||
def listenChannels(self):
|
||||
def virqReceived(virq):
|
||||
eserver.inject('xend.virq', virq)
|
||||
|
||||
self.channelF.setVirqHandler(virqReceived)
|
||||
self.channelF.start()
|
||||
|
||||
def exit(self, rc=0):
|
||||
|
||||
@@ -145,22 +145,10 @@ class ChannelFactory:
|
||||
|
||||
notifier = None
|
||||
|
||||
"""Map of ports to the virq they signal."""
|
||||
virqPorts = None
|
||||
|
||||
def __init__(self):
|
||||
"""Constructor - do not use. Use the channelFactory function."""
|
||||
self.channels = {}
|
||||
self.virqPorts = {}
|
||||
self.notifier = xu.notifier()
|
||||
# Register interest in virqs.
|
||||
self.bind_virq(xen.lowlevel.xc.VIRQ_DOM_EXC)
|
||||
self.virqHandler = None
|
||||
|
||||
def bind_virq(self, virq):
|
||||
port = self.notifier.bind_virq(virq)
|
||||
self.virqPorts[port] = virq
|
||||
log.info("Virq %s on port %s", virq, port)
|
||||
|
||||
def start(self):
|
||||
"""Fork a thread to read messages.
|
||||
@@ -184,11 +172,7 @@ class ChannelFactory:
|
||||
if self.thread == None: return
|
||||
port = self.notifier.read()
|
||||
if port:
|
||||
virq = self.virqPorts.get(port)
|
||||
if virq is not None:
|
||||
self.virqReceived(virq)
|
||||
else:
|
||||
self.msgReceived(port)
|
||||
self.msgReceived(port)
|
||||
else:
|
||||
select.select([self.notifier], [], [], 1.0)
|
||||
|
||||
@@ -218,15 +202,6 @@ class ChannelFactory:
|
||||
thread.setDaemon(True)
|
||||
thread.start()
|
||||
|
||||
def setVirqHandler(self, virqHandler):
|
||||
self.virqHandler = virqHandler
|
||||
|
||||
def virqReceived(self, virq):
|
||||
if DEBUG:
|
||||
print 'virqReceived>', virq
|
||||
if not self.virqHandler: return
|
||||
self.runInThread(lambda virq=virq: self.virqHandler(virq))
|
||||
|
||||
def newChannel(self, dom, local_port, remote_port):
|
||||
"""Create a new channel.
|
||||
"""
|
||||
@@ -547,9 +522,6 @@ class Channel:
|
||||
printMsg(msg)
|
||||
self.queue.response(getMessageId(msg), msg)
|
||||
|
||||
def virq(self):
|
||||
self.factory.virq()
|
||||
|
||||
class Response:
|
||||
"""Entry in the response queue.
|
||||
Used to signal a response to a message.
|
||||
|
||||