Пример #1
0
 def __init__(self, obj):
     self.reference = obj
     self.object = obj.dereference()
     self.object_control = objects.control(self.object['Object'])
     self.attr = attribute(self.object['attribute_set'], 'region')
     self.wait_queue = threads.queue(self.object['Wait_queue'])
     self.heap = heaps.control(self.object['Memory'])
Пример #2
0
 def show(self, from_tty):
     print '     Name:', self.object_control.name()
     print '     Attr:', self.attr.to_string()
     if self.attr.test('semaphore-type', 'bin-sema') or \
             self.attr.test('semaphore-type', 'simple-bin-sema'):
         core_mutex = self.object['Core_control']['mutex']
         locked = core_mutex['lock'] == 0
         if locked:
             s = 'locked'
         else:
             s = 'unlocked'
         print '     Lock:', s
         print '  Nesting:', core_mutex['nest_count']
         print '  Blocked:', core_mutex['blocked_count']
         print '   Holder:',
         holder = core_mutex['holder']
         if holder and locked:
             holder = threads.control(holder.dereference())
             print holder.brief()
         elif holder == 0 and locked:
             print 'locked but no holder'
         else:
             print 'unlocked'
         wait_queue = threads.queue(core_mutex['Wait_queue'])
         tasks = wait_queue.tasks()
         print '    Queue: len = %d, state = %s' % (len(tasks),
                                                    wait_queue.state())
         print '    Tasks:'
         print '    Name (c:current, r:real), (id)'
         for t in range(0, len(tasks)):
             print '      ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
     else:
         print 'semaphore'
Пример #3
0
 def show(self, from_tty):
     print '     Name:', self.object_control.name()
     print '     Attr:', self.attr.to_string()
     if self.attr.test('semaphore-type', 'bin-sema') or \
             self.attr.test('semaphore-type', 'simple-bin-sema'):
         core_mutex = self.object['Core_control']['mutex']
         locked = core_mutex['lock'] == 0
         if locked:
             s = 'locked'
         else:
             s = 'unlocked'
         print '     Lock:', s
         print '  Nesting:', core_mutex['nest_count']
         print '  Blocked:', core_mutex['blocked_count']
         print '   Holder:',
         holder = core_mutex['holder']
         if holder and locked:
             holder = threads.control(holder.dereference())
             print holder.brief()
         elif holder == 0 and locked:
             print 'locked but no holder'
         else:
             print 'unlocked'
         wait_queue = threads.queue(core_mutex['Wait_queue'])
         tasks = wait_queue.tasks()
         print '    Queue: len = %d, state = %s' % (len(tasks),
                                                    wait_queue.state())
         print '    Tasks:'
         print '    Name (c:current, r:real), (id)'
         for t in range(0, len(tasks)):
             print '      ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
     else:
         print 'semaphore'
Пример #4
0
    def __init__(self,obj):
        self.object = obj
        self.object_control = objects.control(self.object['Object'])
        self.attr = attribute(self.object['attribute_set'], \
            'message_queue')
        self.wait_queue = threads.queue( \
            self.object['message_queue']['Wait_queue'])

        self.core_control = supercore.message_queue(self.object['message_queue'])
Пример #5
0
    def __init__(self, obj):
        self.reference = obj
        self.object = obj.dereference()
        self.object_control = objects.control(self.object['Object'])
        self.attr = attribute(self.object['attribute_set'], \
            'message_queue')
        self.wait_queue = threads.queue( \
            self.object['message_queue']['Wait_queue'])

        self.core_control = supercore.message_queue(self.object['message_queue'])
Пример #6
0
 def wait_queue(self):
     return threads.queue(self.ctrl['Wait_queue'])
Пример #7
0
 def __init__(self, barrier):
     self.barrier = barrier
     self.wait_queue = threads.queue(self.barrier['Wait_queue'])
     self.attr = barrier_attributes(self.barrier['Attributes'])
Пример #8
0
 def __init__(self, message_queue):
     self.queue = message_queue
     self.wait_queue = threads.queue(self.queue['Wait_queue'])
Пример #9
0
 def wait_queue(self):
     return threads.queue(self.ctrl['Wait_queue'])
Пример #10
0
 def __init__(self, barrier):
     self.barrier = barrier
     self.wait_queue = threads.queue(self.barrier['Wait_queue'])
     self.attr = barrier_attributes(self.barrier['Attributes'])
Пример #11
0
 def __init__(self, message_queue):
     self.queue = message_queue
     self.wait_queue = threads.queue(self.queue['Wait_queue'])