![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include <threads.h>
Data Fields | |
| uint32_t | signature |
| Signature for entry validation. | |
| uint32_t | count |
| Count for this Semaphore (Can be negative when Threads are waiting). | |
| uint32_t | maximum |
| Maximum count for this Semaphore. | |
| uint32_t | flags |
| Semaphore Flags (eg SEMAPHORE_FLAG_IRQ). | |
| SPIN_HANDLE | lock |
| Semaphore Lock. | |
| LIST_HANDLE | list |
| List of threads waiting on this Semaphore (or INVALID_HANDLE_VALUE if never used). | |
| thread_wait_proc | wait |
| Wait function to call to wait on the Semaphore if the count is equal to zero on SemaphoreWait. | |
| thread_wait_ex_proc | waitex |
| Wait function to call to wait with timeout on the Semaphore if the count is equal to zero on SemaphoreWait. | |
| thread_release_proc | release |
| Release function to call if any threads are waiting on SemaphoreSignal. | |
| thread_abandon_proc | abandon |
| Abandon function to call if any threads are waiting when SemaphoreSignal is destroyed. | |
| SEMAPHORE_ENTRY * | prev |
| Previous entry in Semaphore table. | |
| SEMAPHORE_ENTRY * | next |
| Next entry in Semaphore table. | |
| uint32_t signature |
Signature for entry validation.
| uint32_t count |
Count for this Semaphore (Can be negative when Threads are waiting).
| uint32_t maximum |
Maximum count for this Semaphore.
| uint32_t flags |
Semaphore Flags (eg SEMAPHORE_FLAG_IRQ).
| SPIN_HANDLE lock |
Semaphore Lock.
| LIST_HANDLE list |
List of threads waiting on this Semaphore (or INVALID_HANDLE_VALUE if never used).
| thread_wait_proc wait |
Wait function to call to wait on the Semaphore if the count is equal to zero on SemaphoreWait.
| thread_wait_ex_proc waitex |
Wait function to call to wait with timeout on the Semaphore if the count is equal to zero on SemaphoreWait.
| thread_release_proc release |
Release function to call if any threads are waiting on SemaphoreSignal.
| thread_abandon_proc abandon |
Abandon function to call if any threads are waiting when SemaphoreSignal is destroyed.
| SEMAPHORE_ENTRY* prev |
Previous entry in Semaphore table.
| SEMAPHORE_ENTRY* next |
Next entry in Semaphore table.