Ejemplo n.º 1
0
def thread_heir(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['heir']:
            return cpu
    return -1
Ejemplo n.º 2
0
def thread_active(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['executing']:
            return cpu
    return -1
Ejemplo n.º 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))
Ejemplo n.º 4
0
def thread_heir(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['heir']:
            return cpu
    return -1
Ejemplo n.º 5
0
def thread_active(thread):
    for cpu in range(0, configuration.maximum_processors()):
        if thread == _table(cpu)['executing']:
            return cpu
    return -1
Ejemplo n.º 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))