Пример #1
0
def thread_heir(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['heir']:
            return cpu
    return -1
Пример #2
0
def thread_active(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['executing']:
            return cpu
    return -1
Пример #3
0
def _table(cpu):
    max_cpus = configuration.maximum_processors()
    if cpu >= max_cpus:
        raise IndexError('cpu index out of range (%d)' % (max_cpus))
    return gdb.parse_and_eval('_Per_CPU_Information[%d].per_cpu' % (cpu))
Пример #4
0
def thread_heir(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['heir']:
            return cpu
    return -1
Пример #5
0
def thread_active(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['executing']:
            return cpu
    return -1
Пример #6
0
def _table(cpu):
    max_cpus = configuration.maximum_processors()
    if cpu >= max_cpus:
        raise IndexError('cpu index out of range (%d)' % (max_cpus))
    return gdb.parse_and_eval('_Per_CPU_Information[%d].per_cpu' % (cpu))