SourcePoint AMD Help

Table of Contents

isrunning

Display whether the specified processor is running.

Syntax

[result =] [[px]] isrunning

Where:

[px]

is the viewpoint override, including punctuation ( [ ] ), specifying that the viewpoint is temporarily set to processor x of the boundary scan chain.ย  The processor can be specified as px (where x is the processor ID), or an alias you have defined for a given processor ID.ย  ALL cannot be used as a viewpoint override.

result

specifies a debug variable to which the function return value is assigned. If result is not specified, the return value is displayed on the next line of the screen.

Discussion

Use the isrunning control variable to determine if a specific target processor is running. This returns false for threads (or processors) that are either halted or disabled. Entering the command at the command line or in an expression returns 0 (false for halted or disabled) or 1 (true for running).

Example 1

To display the state of the viewpoint processor:

Command input:

isrunning

Result:

FALSE

Command input:

go

isrunning

Result:

TRUE

Example 2

To display the state of processor P3:

Command input:

[P3]isrunning

Result:

TRUE

Example 3

To save the current viewpoint processor state in a user defined variable:

Command input:

define ord1 _isrunning

_isrunning = isrunning

Example

To use isrunning in an expression: ย 

Command input:

go

printf("processor is %s\n", isrunning ? "running" : "stopped")

Result:

processor is running

ย 

ย