![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include <threads.h>
Data Fields | |
| uint32_t | signature |
| Signature for entry validation. | |
| uint32_t | state |
| State of the Thread (eg THREAD_STATE_RUNNING). | |
| uint32_t | flags |
| Flags of the Thread (eg THREAD_FLAG_PERSIST). | |
| uint32_t | priority |
| Priority of the Thread (eg THREAD_PRIORITY_NORMAL). | |
| uint32_t | affinity |
| CPU Affinity mask of the Thread. | |
| void * | stackbase |
| Base (Top) of the thread stack. | |
| uint32_t | stacksize |
| Stack length in bytes. | |
| char | name [THREAD_NAME_LENGTH] |
| The name of the Thread. | |
| SPIN_HANDLE | lock |
| Thread Lock. | |
| THREAD_HANDLE | parent |
| Handle of the parent thread. | |
| MESSAGE_LIST | messages |
| Messages sent to this thread. | |
| void * | tlspointer |
| Thread Local Storage Memory (RTL ThreadVars). | |
| void * | tlstable [THREAD_TLS_MAXIMUM] |
| Thread Local Storage Index Pointers (for ThreadGetTlsValue/ThreadSetTlsValue) //To Do //Test. | |
| uint32_t | tlsflags [THREAD_TLS_MAXIMUM] |
| Thread Local Storage Index Flags (eg THREAD_TLS_FLAG_FREE). | |
| uint32_t | exitcode |
| Thread Exit Code. | |
| uint32_t | lasterror |
| Thread Last Error. | |
| LCID | locale |
| Thread Locale. | |
| uint32_t | currentcpu |
| Saved current CPU from last ContextSwitch. | |
| void * | stackpointer |
| Saved current stack pointer from last ContextSwitch. | |
| uint32_t | targetcpu |
| Target CPU of the Thread for next ContextSwitch. | |
| uint32_t | targetpriority |
| Target Priority of the Thread for next ContextSwitch (eg THREAD_PRIORITY_NORMAL). | |
| LIST_HANDLE | list |
| List of threads waiting on this thread (or INVALID_HANDLE_VALUE if never used). | |
| LIST_HANDLE | waitlist |
| The wait list this thread is currently in (or INVALID_HANDLE_VALUE). | |
| LIST_HANDLES * | waitlists |
| The wait lists this thread is currently in if doing a multiple wait (or nil). | |
| uint32_t | waitresult |
| The result code for the last wait with timeout (eg WAIT_TIMEOUT). | |
| uint32_t | receiveresult |
| The result code for the last receive with timeout (eg WAIT_TIMEOUT). | |
| QUEUE_HANDLE | schedulequeue |
| The scheduler queue this thread is currently in (or INVALID_HANDLE_VALUE). | |
| LIST_ELEMENT | listelement |
| List element for this thread when in a Wait List. | |
| QUEUE_ELEMENT | queueelement |
| Queue element for this thread when in a Schedule Queue. | |
| THREAD_ENTRY * | prev |
| Previous entry in Thread table. | |
| THREAD_ENTRY * | next |
| Next entry in Thread table. | |
| int64_t | createtime |
| The time when this thread was created. | |
| int64_t | exittime |
| The time when this thread exited or was terminated. | |
| int64_t | kerneltime |
| The total amount of time this thread has been in the running state (ie CPU time consumed). | |
| int64_t | switchcount |
| The number of times this thread has been selected to run by a context switch. | |
| uint32_t signature |
Signature for entry validation.
| uint32_t state |
State of the Thread (eg THREAD_STATE_RUNNING).
| uint32_t flags |
Flags of the Thread (eg THREAD_FLAG_PERSIST).
| uint32_t priority |
Priority of the Thread (eg THREAD_PRIORITY_NORMAL).
| uint32_t affinity |
CPU Affinity mask of the Thread.
| void* stackbase |
Base (Top) of the thread stack.
| uint32_t stacksize |
Stack length in bytes.
| char name[THREAD_NAME_LENGTH] |
The name of the Thread.
| SPIN_HANDLE lock |
Thread Lock.
| THREAD_HANDLE parent |
Handle of the parent thread.
| MESSAGE_LIST messages |
Messages sent to this thread.
| void* tlspointer |
Thread Local Storage Memory (RTL ThreadVars).
| void* tlstable[THREAD_TLS_MAXIMUM] |
Thread Local Storage Index Pointers (for ThreadGetTlsValue/ThreadSetTlsValue) //To Do //Test.
| uint32_t tlsflags[THREAD_TLS_MAXIMUM] |
Thread Local Storage Index Flags (eg THREAD_TLS_FLAG_FREE).
| uint32_t exitcode |
Thread Exit Code.
| uint32_t lasterror |
Thread Last Error.
| LCID locale |
Thread Locale.
| uint32_t currentcpu |
Saved current CPU from last ContextSwitch.
| void* stackpointer |
Saved current stack pointer from last ContextSwitch.
| uint32_t targetcpu |
Target CPU of the Thread for next ContextSwitch.
| uint32_t targetpriority |
Target Priority of the Thread for next ContextSwitch (eg THREAD_PRIORITY_NORMAL).
| LIST_HANDLE list |
List of threads waiting on this thread (or INVALID_HANDLE_VALUE if never used).
| LIST_HANDLE waitlist |
The wait list this thread is currently in (or INVALID_HANDLE_VALUE).
| LIST_HANDLES* waitlists |
The wait lists this thread is currently in if doing a multiple wait (or nil).
| uint32_t waitresult |
The result code for the last wait with timeout (eg WAIT_TIMEOUT).
| uint32_t receiveresult |
The result code for the last receive with timeout (eg WAIT_TIMEOUT).
| QUEUE_HANDLE schedulequeue |
The scheduler queue this thread is currently in (or INVALID_HANDLE_VALUE).
| LIST_ELEMENT listelement |
List element for this thread when in a Wait List.
| QUEUE_ELEMENT queueelement |
Queue element for this thread when in a Schedule Queue.
| THREAD_ENTRY* prev |
Previous entry in Thread table.
| THREAD_ENTRY* next |
Next entry in Thread table.
| int64_t createtime |
The time when this thread was created.
| int64_t exittime |
The time when this thread exited or was terminated.
| int64_t kerneltime |
The total amount of time this thread has been in the running state (ie CPU time consumed).
| int64_t switchcount |
The number of times this thread has been selected to run by a context switch.