Change Thread Status (QteChangeThreadStatus) API


Required Parameter Group:

1
Thread debug status
Input
Char(10)
2
Thread array
Input
Array of Char(8)
3
Number of threads
Input
Binary(4)
4
Error code
I/O
Char(*)

Service Program: QTETHRD


Threadsafe: No

The Change Thread Status (QteChangeThreadStatus) API changes the debug status for threads being debugged. (2)

Before the debug status of a thread can be changed, the thread must be stopped or halted by debug support. If any thread specified in the thread array has not been stopped or halted by debug support, an error is returned to the API caller and the debug status of all threads is unchanged.

Threads debugging is supported if a service job is used to debug a job that was spawned by native threads support. If this is not the debug environment present when this API is called, a CPF958B error is returned.

Authorities and Locks

None

Required Parameter Group

Thread debug status
INPUT; CHAR(10)

The desired debug status for the thread identifiers specified in the thread array parameter. The valid debug status values are:

*ENABLE
Enable the specified threads.

*DISABLE
Disable the specified threads.

Thread array
INPUT; ARRAY OF CHAR(8)

The thread identifiers for which debug status is changed. Each thread identifier in the thread array is 8 bytes long. The number of thread identifiers is specified in the number of threads parameter.

If the number of threads parameter is minus one, the first and only thread array parameter must be a special value. In this case, all other thread array parameters are ignored. Valid special values are:

*ALL
The debug status for all threads is changed to the debug status specified in the thread debug status parameter.

Number of threads
INPUT; BINARY(4)

The number of thread identifiers provided in the thread array parameter. The number of threads parameter must be greater than zero or a minus one. If it has a value of minus one, the first and only thread array parameter must be a special value. If it is greater than zero, the number specified is the number of thread array parameters that must be provided.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.

Error Messages

CPF3C1E E
Required parameter &1 omitted.
CPF3CF1 E
Error code parameter not valid.
CPF3CF2 E
Error(s) occurred during running of &1 API.
CPF9541 E
Not in debug mode.
CPF9549 E
Error addressing API parameter.
CPF958A E
Thread &1 not found.
CPF958B E
Threads debugging not supported.
CPF958C E
Number of threads not valid.
CPF959B E
Thread status value not valid.
CPF959C E
Thread array special value not valid.
CPF959D E
Thread status cannot be changed.


Top | Debugger APIs | Source Debugger APIs
Source Debugger APIs and Exit Programs | Create View APIs
| APIs by category

[Information Center Home Page | Feedback ] [Legal | AS/400 Glossary]