The result is of enumeration type RTKTaskState. One of the following values can be returned:
| Value |
Meaning |
| TS_READY |
The task is ready to run. |
| TS_CURRENT |
The task is running. |
| TS_SUSPENDED |
The task has been suspended by a call to RTKSuspend. |
| TS_DELAYING |
The task is waiting in a call to RTKDelay or RTKDelayUntil. |
| TS_BLOCKED_WAIT |
The task is waiting in a call to RTKWait at a semaphore. |
| TS_TIMED_WAIT |
The task is waiting in a call to RTKWaitTimed or RTKWaitUntil at a semaphore. |
| TS_BLOCKED_PUT |
The task is waiting in a call to RTKPut at a full mailbox. |
| TS_BLOCKED_GET |
The task is waiting in a call to RTKGet at an empty mailbox. |
| TS_TIMED_PUT |
The task is waiting in a call to RTKPutTimed or RTKPutUntil at a full mailbox. |
| TS_TIMED_GET |
The task is waiting in a call to RTKGetTimed or RTKGetUntil at an empty mailbox. |
| TS_BLOCKED_SEND |
The task is waiting in a call to RTKSend for the receiver task. |
| TS_BLOCKED_RECEIVE |
The task is waiting in a call to RTKReceive to receive data. |
| TS_TIMED_SEND |
The task is waiting in a call to RTKSendTimed or RTKSendUntil for the receiver task. |
| TS_TIMED_RECEIVE |
The task is waiting in a call to RTKReceiveTimed or RTKReceiveUntil to receive data. |
| TS_DEADLOCKED |
The task is blocked in a send operation message passing) and the receiver task has terminated in the meantime. |
| TS_ILLEGAL |
The handle passed does not reference an existing task. Every other RTKernel-32 operation expecting a task handle as a parameter will abort the program with an error message if an invalid handle is passed to it. You can use RTKGetTaskState to verify handles. |
| TS_TERMINATED |
The task has terminated itself by calling RTKTerminateTask with its own handle or by reaching the end of its task function. The task cannot run any more but it still exists because its memory has not yet been deallocated. |