![]() |
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 lock (Locked/Unlocked). | |
| uint32_t | count |
| Count of lock recursions. | |
| THREAD_HANDLE | owner |
| Currently owning thread (or INVALID_HANDLE_VALUE if not locked). | |
| uint32_t | spincount |
| Number of times to spin wait for lock before Wait is called (Always 0 if SCHEDULER_CPU_COUNT = 1). | |
| SPIN_HANDLE | lock |
| Critical Section Lock. | |
| LIST_HANDLE | list |
| List of threads waiting on this CriticalSection (or INVALID_HANDLE_VALUE if never used). | |
| thread_wait_proc | wait |
| Wait function to call to wait on the CriticalSection if it is already locked. | |
| thread_wait_ex_proc | waitex |
| Wait function to call to wait with timeout on the CriticalSection if it is already locked. | |
| thread_release_proc | release |
| Release function to call if any threads are waiting when CriticalSection is unlocked. | |
| thread_abandon_proc | abandon |
| Abandon function to call if any threads are waiting when CriticalSection is destroyed. | |
| CRITICAL_SECTION_ENTRY * | prev |
| Previous entry in CriticalSection table. | |
| CRITICAL_SECTION_ENTRY * | next |
| Next entry in CriticalSection table. | |
| uint32_t signature |
Signature for entry validation.
| uint32_t state |
State of the lock (Locked/Unlocked).
| uint32_t count |
Count of lock recursions.
| THREAD_HANDLE owner |
Currently owning thread (or INVALID_HANDLE_VALUE if not locked).
| uint32_t spincount |
Number of times to spin wait for lock before Wait is called (Always 0 if SCHEDULER_CPU_COUNT = 1).
| SPIN_HANDLE lock |
Critical Section Lock.
| LIST_HANDLE list |
List of threads waiting on this CriticalSection (or INVALID_HANDLE_VALUE if never used).
| thread_wait_proc wait |
Wait function to call to wait on the CriticalSection if it is already locked.
| thread_wait_ex_proc waitex |
Wait function to call to wait with timeout on the CriticalSection if it is already locked.
| thread_release_proc release |
Release function to call if any threads are waiting when CriticalSection is unlocked.
| thread_abandon_proc abandon |
Abandon function to call if any threads are waiting when CriticalSection is destroyed.
| CRITICAL_SECTION_ENTRY* prev |
Previous entry in CriticalSection table.
| CRITICAL_SECTION_ENTRY* next |
Next entry in CriticalSection table.