bitkeeper revision 1.1159.1.525 (41d58ba8VgPwkfEiKrUXF8b7LLwQ5Q)

Andy's control-interface message switch -- first cut.
This commit is contained in:
kaf24@scramble.cl.cam.ac.uk committed 2004-12-31 17:26:00 +00:00
1 parent 49310a0b33
commit 8b313272dd
21 files changed
+2742 -360

No files matched your search

+1
View File
@@ -10,6 +10,7 @@ extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
include_dirs = [ XEN_ROOT + "/tools/python/xen/lowlevel/xu",
XEN_ROOT + "/tools/libxc",
XEN_ROOT + "/tools/libxutil",
XEN_ROOT + "/tools/xcs",
]
library_dirs = [ XEN_ROOT + "/tools/libxc",
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -118,9 +118,9 @@ class NotifierPort(abstract.FileDescriptor):
if hasattr(self, 'protocol'):
self.protocol.doStop()
self.connected = 0
#self.notifier.close() # Not implemented.
os.close(self.fileno())
del self.notifier
#self.notifier.close() # (this said:) Not implemented.
#os.close(self.fileno()) # But yes it is...
del self.notifier # ...as _dealloc!
if hasattr(self, 'd'):
self.d.callback(None)
del self.d
+7 -2
View File
@@ -171,8 +171,10 @@ class VirqChannel(BaseChannel):
"""
BaseChannel.__init__(self, factory)
self.virq = virq
self.factory = factory
# Notification port (int).
self.port = xc.evtchn_bind_virq(virq)
#self.port = xc.evtchn_bind_virq(virq)
self.port = factory.notifier.bind_virq(virq)
self.idx = self.port
# Clients to call when a virq arrives.
self.clients = []
@@ -208,7 +210,8 @@ class VirqChannel(BaseChannel):
c.virqReceived(self.virq)
def notify(self):
xc.evtchn_send(self.port)
# xc.evtchn_send(self.port)
self.factory.notifier.virq_send(self.port)
class Channel(BaseChannel):
@@ -279,6 +282,7 @@ class Channel(BaseChannel):
self.devs.append(dev)
for ty in types:
self.devs_by_type[ty] = dev
self.port.register(ty)
def deregisterDevice(self, dev):
"""Remove the registration for a device controller.
@@ -290,6 +294,7 @@ class Channel(BaseChannel):
types = [ ty for (ty, d) in self.devs_by_type.items() if d == dev ]
for ty in types:
del self.devs_by_type[ty]
self.port.deregister(ty)
def getDevice(self, type):
"""Get the device controller handling a message type.
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.