예제 #1
0
파일: api.py 프로젝트: zhouat/pyrebox
def r_cpu(cpu_index = 0):
    """Read CPU register values 
        :param cpu_index: The CPU index to read. 0 by default.
        :type cpu_index: int
        
        :return: The CPU
        :rtype: X64CPU | X86CPU | ...
    """
    import c_api
    #If this function call fails, it will raise an exception. 
    #Given that the exception is self explanatory, we just let it propagate upwards 
    return c_api.r_cpu(cpu_index)
예제 #2
0
def r_cpu(cpu_index=0):
    """Read CPU register values
        :param cpu_index: The CPU index to read. 0 by default.
        :type cpu_index: int

        :return: The CPU
        :rtype: X64CPU | X86CPU | ...
    """
    import c_api
    # If this function call fails, it will raise an exception.
    # Given that the exception is self explanatory, we just let it propagate
    # upwards
    if cpu_index >= get_num_cpus():
        raise ValueError("Incorrect cpu index specified")

    return c_api.r_cpu(cpu_index)
예제 #3
0
파일: api.py 프로젝트: CRYP706URU/pyrebox
def r_cpu(cpu_index=0):
    """Read CPU register values
        :param cpu_index: The CPU index to read. 0 by default.
        :type cpu_index: int

        :return: The CPU
        :rtype: X64CPU | X86CPU | ...
    """
    import c_api
    # If this function call fails, it will raise an exception.
    # Given that the exception is self explanatory, we just let it propagate
    # upwards
    if cpu_index >= get_num_cpus():
        raise ValueError("Incorrect cpu index specified")

    return c_api.r_cpu(cpu_index)