C API thread definitions. More...
Classes | |
struct | os_thread_attr_s |
Thread attributes. More... | |
struct | os_thread_context_s |
Thread context. More... | |
struct | os_thread_s |
Thread object storage. More... | |
struct | os_thread_stack_s |
Thread stack. More... | |
struct | os_thread_statistics_s |
Thread statistics. More... | |
Typedefs | |
typedef struct os_thread_attr_s | os_thread_attr_t |
Thread attributes. | |
typedef struct os_thread_context_s | os_thread_context_t |
Thread context. | |
typedef void * | os_thread_func_args_t |
Type of thread function arguments. | |
typedef void *(* | os_thread_func_t) (os_thread_func_args_t args) |
Type of thread function. | |
typedef uint8_t | os_thread_prio_t |
Type of variables holding thread priorities. | |
typedef os_port_thread_stack_allocation_element_t | os_thread_stack_allocation_element_t |
Type of variables holding aligned stack elements. | |
typedef os_port_thread_stack_element_t | os_thread_stack_element_t |
Type of variables holding stack words. | |
typedef struct os_thread_stack_s | os_thread_stack_t |
Thread stack. | |
typedef uint8_t | os_thread_state_t |
Type of variables holding thread states. | |
typedef struct os_thread_statistics_s | os_thread_statistics_t |
Thread statistics. | |
typedef struct os_thread_s | os_thread_t |
Thread object storage. | |
Enumerations | |
enum | { os_thread_priority_none = 0 , os_thread_priority_idle = (1 << (4) ) , os_thread_priority_lowest = (2 << (4) ) , os_thread_priority_low = (2 << (4) ) , os_thread_priority_below_normal = (4 << (4) ) , os_thread_priority_normal = (6 << (4) ) , os_thread_priority_above_normal = (8 << (4) ) , os_thread_priority_high = (10 << (4) ) , os_thread_priority_realtime = (12 << (4) ) , os_thread_priority_highest = (((13 + 1) << (4) ) - 1) , os_thread_priority_isr = (((14 + 1) << (4) ) - 1) , os_thread_priority_error = (((15 + 1) << (4) ) - 1) } |
Thread priorities; intermediate values are also possible. More... | |
enum | { os_thread_state_undefined = 0 , os_thread_state_ready = 1 , os_thread_state_running = 2 , os_thread_state_suspended = 3 , os_thread_state_terminated = 4 , os_thread_state_destroyed = 5 , os_thread_state_initialising = 6 } |
An enumeration with all possible thread states. More... | |
Current Thread Functions | |
os_thread_t * | os_this_thread (void) |
Get the current running thread. | |
void | os_this_thread_suspend (void) |
Suspend the current running thread to wait for an event. | |
void | os_this_thread_exit (void *exit_ptr) |
Terminate the current running thread. | |
os_result_t | os_this_thread_flags_wait (os_flags_mask_t mask, os_flags_mask_t *oflags, os_flags_mode_t mode) |
Wait for thread event flags. | |
os_result_t | os_this_thread_flags_try_wait (os_flags_mask_t mask, os_flags_mask_t *oflags, os_flags_mode_t mode) |
Try to wait for thread event flags. | |
os_result_t | os_this_thread_flags_timed_wait (os_flags_mask_t mask, os_clock_duration_t timeout, os_flags_mask_t *oflags, os_flags_mode_t mode) |
Timed wait for thread event flags. | |
os_result_t | os_this_thread_flags_clear (os_flags_mask_t mask, os_flags_mask_t *oflags) |
Clear thread event flags. | |
os_flags_mask_t | os_this_thread_flags_get (os_flags_mask_t mask, os_flags_mode_t mode) |
Get/clear thread event flags. | |
Thread Attribute Functions | |
void | os_thread_attr_init (os_thread_attr_t *attr) |
Initialise the thread attributes. | |
Thread Creation Functions | |
void | os_thread_construct (os_thread_t *thread, const char *name, os_thread_func_t func, const os_thread_func_args_t args, const os_thread_attr_t *attr) |
Construct a statically allocated thread object instance. | |
void | os_thread_destruct (os_thread_t *thread) |
Destruct the statically allocated thread object instance. | |
os_thread_t * | os_thread_new (const char *name, os_thread_func_t func, const os_thread_func_args_t args, const os_thread_attr_t *attr) |
Allocate a thread object instance and construct it. | |
void | os_thread_delete (os_thread_t *thread) |
Destruct the thread object instance and deallocate it. | |
bool | os_thread_is_constructed (os_thread_t *thread) |
Check if the thread is constructed. | |
Thread Functions | |
const char * | os_thread_get_name (os_thread_t *thread) |
Get the thread name. | |
os_thread_prio_t | os_thread_get_priority (os_thread_t *thread) |
Get the thread current scheduling priority. | |
os_result_t | os_thread_set_priority (os_thread_t *thread, os_thread_prio_t prio) |
Set the thread dynamic scheduling priority. | |
os_result_t | os_thread_kill (os_thread_t *thread) |
Force thread termination. | |
os_result_t | os_thread_join (os_thread_t *thread, void **exit_ptr) |
Wait for thread termination. | |
void | os_thread_resume (os_thread_t *thread) |
Resume the thread. | |
os_result_t | os_thread_flags_raise (os_thread_t *thread, os_flags_mask_t mask, os_flags_mask_t *oflags) |
Raise thread event flags. | |
os_thread_state_t | os_thread_get_state (os_thread_t *thread) |
Get the thread scheduler state. | |
os_thread_user_storage_t * | os_thread_get_user_storage (os_thread_t *thread) |
Get the thread user storage. | |
os_thread_stack_t * | os_thread_get_stack (os_thread_t *thread) |
Get the thread context stack. | |
Thread Stack Functions | |
size_t | os_thread_stack_get_default_size (void) |
Get the default stack size. | |
size_t | os_thread_stack_set_default_size (size_t size_bytes) |
Set the default stack size. | |
size_t | os_thread_stack_get_min_size (void) |
Get the min stack size. | |
size_t | os_thread_stack_set_min_size (size_t size_bytes) |
Set the min stack size. | |
os_thread_stack_element_t * | os_thread_stack_get_bottom (os_thread_stack_t *stack) |
Get the stack lowest reserved address. | |
os_thread_stack_element_t * | os_thread_stack_get_top (os_thread_stack_t *stack) |
Get the top stack address. | |
size_t | os_thread_stack_get_size (os_thread_stack_t *stack) |
Get the stack size. | |
size_t | os_thread_stack_get_available (os_thread_stack_t *stack) |
Compute how much available stack remains. | |
bool | os_thread_stack_check_bottom_magic (os_thread_stack_t *stack) |
Check if bottom magic word is still there. | |
bool | os_thread_stack_check_top_magic (os_thread_stack_t *stack) |
Check if top magic word is still there. | |
Thread Statistics Functions | |
os_statistics_counter_t | os_thread_stat_get_context_switches (os_thread_t *thread) |
Get the number of thread context switches. | |
os_statistics_duration_t | os_thread_stat_get_cpu_cycles (os_thread_t *thread) |
Get the thread execution time. | |
Thread Children Iterator Functions | |
os_iterator_t | os_children_threads_iter_begin (os_thread_t *thread) |
Get the beginning of the list of children threads. | |
os_iterator_t | os_children_threads_iter_end (os_thread_t *thread) |
Get the end of the list of children threads. | |
os_thread_t * | os_children_threads_iter_get (os_iterator_t iterator) |
Get the thread from the current iterator position. | |
os_iterator_t | os_children_threads_iter_next (os_iterator_t iterator) |
Advance the iterator to the next position. | |
Compatibility Macros | |
#define | os_thread_create os_thread_construct |
#define | os_thread_destroy os_thread_destruct |
#define | os_timer_create os_timer_construct |
#define | os_timer_destroy os_timer_destruct |
#define | os_mutex_create os_mutex_construct |
#define | os_mutex_recursive_create os_mutex_recursive_construct |
#define | os_mutex_destroy os_mutex_destruct |
#define | os_condvar_create os_condvar_construct |
#define | os_condvar_destroy os_condvar_destruct |
#define | os_semaphore_create os_semaphore_construct |
#define | os_semaphore_binary_create os_semaphore_binary_construct |
#define | os_semaphore_counting_create os_semaphore_counting_construct |
#define | os_semaphore_destroy os_semaphore_destruct |
#define | os_mempool_create os_mempool_construct |
#define | os_mempool_destroy os_mempool_destruct |
#define | os_mqueue_create os_mqueue_construct |
#define | os_mqueue_destroy os_mqueue_destruct |
#define | os_evflags_create os_evflags_construct |
#define | os_evflags_destroy os_evflags_destruct |
C API thread definitions.
#define os_condvar_create os_condvar_construct |
Definition at line 1647 of file os-c-api.h.
#define os_condvar_destroy os_condvar_destruct |
Definition at line 1648 of file os-c-api.h.
#define os_evflags_create os_evflags_construct |
Definition at line 2637 of file os-c-api.h.
#define os_evflags_destroy os_evflags_destruct |
Definition at line 2638 of file os-c-api.h.
#define os_mempool_create os_mempool_construct |
Definition at line 2127 of file os-c-api.h.
#define os_mempool_destroy os_mempool_destruct |
Definition at line 2128 of file os-c-api.h.
#define os_mqueue_create os_mqueue_construct |
Definition at line 2423 of file os-c-api.h.
#define os_mqueue_destroy os_mqueue_destruct |
Definition at line 2424 of file os-c-api.h.
#define os_mutex_create os_mutex_construct |
Definition at line 1454 of file os-c-api.h.
#define os_mutex_destroy os_mutex_destruct |
Definition at line 1456 of file os-c-api.h.
#define os_mutex_recursive_create os_mutex_recursive_construct |
Definition at line 1455 of file os-c-api.h.
#define os_semaphore_binary_create os_semaphore_binary_construct |
Definition at line 1921 of file os-c-api.h.
#define os_semaphore_counting_create os_semaphore_counting_construct |
Definition at line 1922 of file os-c-api.h.
#define os_semaphore_create os_semaphore_construct |
Definition at line 1920 of file os-c-api.h.
#define os_semaphore_destroy os_semaphore_destruct |
Definition at line 1923 of file os-c-api.h.
#define os_thread_create os_thread_construct |
Definition at line 636 of file os-c-api.h.
#define os_thread_destroy os_thread_destruct |
Definition at line 637 of file os-c-api.h.
#define os_timer_create os_timer_construct |
Definition at line 1153 of file os-c-api.h.
#define os_timer_destroy os_timer_destruct |
Definition at line 1154 of file os-c-api.h.
typedef struct os_thread_attr_s os_thread_attr_t |
Thread attributes.
Initialise this structure with os_thread_attr_init()
, and then set any of the individual members directly.
typedef struct os_thread_context_s os_thread_context_t |
Thread context.
The members of this structure are hidden and should not be accessed directly, but through associated functions.
typedef void* os_thread_func_args_t |
Type of thread function arguments.
Useful to cast other similar types to silence possible compiler warnings.
Definition at line 343 of file os-c-decls.h.
typedef void *(* os_thread_func_t) (os_thread_func_args_t args) |
Type of thread function.
Useful to cast other similar types to silence possible compiler warnings.
Definition at line 354 of file os-c-decls.h.
typedef uint8_t os_thread_prio_t |
Type of variables holding thread priorities.
A numeric type used to hold thread priorities, affecting the thread behaviour, like scheduling and thread wakeup due to events; usually an unsigned 8-bits type.
Higher values represent higher priorities.
Definition at line 376 of file os-c-decls.h.
typedef os_port_thread_stack_allocation_element_t os_thread_stack_allocation_element_t |
Type of variables holding aligned stack elements.
A numeric type intended to be used for stack allocations.
Definition at line 399 of file os-c-decls.h.
typedef os_port_thread_stack_element_t os_thread_stack_element_t |
Type of variables holding stack words.
A numeric type intended to store a stack word as stored by push instructions.
Definition at line 389 of file os-c-decls.h.
typedef struct os_thread_stack_s os_thread_stack_t |
Thread stack.
The members of this structure are hidden and should not be accessed directly, but through associated functions.
typedef uint8_t os_thread_state_t |
Type of variables holding thread states.
Definition at line 362 of file os-c-decls.h.
typedef struct os_thread_statistics_s os_thread_statistics_t |
Thread statistics.
The members of this structure are hidden and should not be accessed directly, but through associated functions.
typedef struct os_thread_s os_thread_t |
Thread object storage.
This C structure has the same size as the C++ os::rtos::thread
object and must be initialised with os_thread_create()
.
Later on a pointer to it can be used both in C and C++ to refer to the thread object instance.
The members of this structure are hidden and should not be used directly, but only through specific functions.
anonymous enum |
Thread priorities; intermediate values are also possible.
Definition at line 281 of file os-c-decls.h.
anonymous enum |
An enumeration with all possible thread states.
Definition at line 303 of file os-c-decls.h.
os_iterator_t os_children_threads_iter_begin | ( | os_thread_t * | thread | ) |
Get the beginning of the list of children threads.
[in] | thread | Pointer to thread object or NULL for the list of top threads. |
Return the position of the first element in the list of children threads of the given thread. If NULL, the position first element in the list of top threads is returned.
Definition at line 1007 of file os-c-wrapper.cpp.
os_iterator_t os_children_threads_iter_end | ( | os_thread_t * | thread | ) |
Get the end of the list of children threads.
[in] | thread | Pointer to thread object or NULL for the list of top threads. |
Return the position after the last element in the list of children threads of the given thread. If NULL, the position after the last element in the list of top threads is returned.
The iteration loop must be terminated when the current iterator is equal to this position, before entering the loop body.
Definition at line 1025 of file os-c-wrapper.cpp.
os_thread_t * os_children_threads_iter_get | ( | os_iterator_t | iterator | ) |
Get the thread from the current iterator position.
[in] | iterator | An active iterator. |
Calling it when the iterator is equal to the end position leads to unpredictable results.
Definition at line 1039 of file os-c-wrapper.cpp.
os_iterator_t os_children_threads_iter_next | ( | os_iterator_t | iterator | ) |
Advance the iterator to the next position.
[in] | iterator | An active iterator. |
Calling it when the iterator is equal to the end position leads to unpredictable results.
Definition at line 1055 of file os-c-wrapper.cpp.
os_thread_t * os_this_thread | ( | void | ) |
Get the current running thread.
Definition at line 484 of file os-c-wrapper.cpp.
void os_this_thread_exit | ( | void * | exit_ptr | ) |
Terminate the current running thread.
[in] | exit_ptr | Pointer to object to return. (Optional, may be NULL). |
Definition at line 508 of file os-c-wrapper.cpp.
os_result_t os_this_thread_flags_clear | ( | os_flags_mask_t | mask, |
os_flags_mask_t * | oflags | ||
) |
Clear thread event flags.
[in] | mask | The OR-ed flags to clear. |
[out] | oflags | Optional pointer where to store the previous flags; may be NULL . |
os_ok | The flags were cleared. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
EINVAL | The mask is zero. |
Definition at line 561 of file os-c-wrapper.cpp.
os_flags_mask_t os_this_thread_flags_get | ( | os_flags_mask_t | mask, |
os_flags_mode_t | mode | ||
) |
Get/clear thread event flags.
[in] | mask | The OR-ed flags to get/clear; may be zero. |
[in] | mode | Mode bits to select if the flags should be cleared (the other bits are ignored). |
flags | The selected bits from the current thread event flags mask. |
sig::all | Cannot be invoked from an Interrupt Service Routines. |
Definition at line 573 of file os-c-wrapper.cpp.
os_result_t os_this_thread_flags_timed_wait | ( | os_flags_mask_t | mask, |
os_clock_duration_t | timeout, | ||
os_flags_mask_t * | oflags, | ||
os_flags_mode_t | mode | ||
) |
Timed wait for thread event flags.
[in] | mask | The expected flags (OR-ed bit-mask); may be zero. |
[out] | oflags | Pointer where to store the current flags; may be NULL . |
[in] | mode | Mode bits to select if either all or any flags are expected, and if the flags should be cleared. |
[in] | timeout | Timeout to wait, in clock units (ticks or seconds). |
os_ok | All expected flags are raised. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
ETIMEDOUT | The expected condition did not occur during the entire timeout duration. |
EINVAL | The mask is outside of the permitted range. |
EINTR | The operation was interrupted. |
ENOTRECOVERABLE | Wait failed. |
Definition at line 546 of file os-c-wrapper.cpp.
os_result_t os_this_thread_flags_try_wait | ( | os_flags_mask_t | mask, |
os_flags_mask_t * | oflags, | ||
os_flags_mode_t | mode | ||
) |
Try to wait for thread event flags.
[in] | mask | The expected flags (OR-ed bit-mask); may be zero. |
[out] | oflags | Pointer where to store the current flags; may be NULL . |
[in] | mode | Mode bits to select if either all or any flags are expected, and if the flags should be cleared. |
os_ok | All expected flags are raised. |
EINVAL | The mask is outside of the permitted range. |
EWOULDBLOCK | The expected condition did not occur. |
ENOTRECOVERABLE | Wait failed. |
Definition at line 533 of file os-c-wrapper.cpp.
os_result_t os_this_thread_flags_wait | ( | os_flags_mask_t | mask, |
os_flags_mask_t * | oflags, | ||
os_flags_mode_t | mode | ||
) |
Wait for thread event flags.
[in] | mask | The expected flags (OR-ed bit-mask); may be zero. |
[out] | oflags | Pointer where to store the current flags; may be NULL . |
[in] | mode | Mode bits to select if either all or any flags are expected, and if the flags should be cleared. |
os_ok | All expected flags are raised. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
EINVAL | The mask is outside of the permitted range. |
EINTR | The operation was interrupted. |
ENOTRECOVERABLE | Wait failed. |
Definition at line 520 of file os-c-wrapper.cpp.
void os_this_thread_suspend | ( | void | ) |
Suspend the current running thread to wait for an event.
Definition at line 496 of file os-c-wrapper.cpp.
void os_thread_attr_init | ( | os_thread_attr_t * | attr | ) |
Initialise the thread attributes.
[in] | attr | Pointer to thread attributes object instance. |
Definition at line 587 of file os-c-wrapper.cpp.
void os_thread_construct | ( | os_thread_t * | thread, |
const char * | name, | ||
os_thread_func_t | func, | ||
const os_thread_func_args_t | args, | ||
const os_thread_attr_t * | attr | ||
) |
Construct a statically allocated thread object instance.
[in] | thread | Pointer to thread object instance storage. |
[in] | name | Pointer to name (may be NULL). |
[in] | func | Pointer to thread function. |
[in] | args | Pointer to thread function arguments (may be NULL). |
[in] | attr | Pointer to attributes (may be NULL) |
os_thread_destruct()
.Definition at line 602 of file os-c-wrapper.cpp.
void os_thread_delete | ( | os_thread_t * | thread | ) |
Destruct the thread object instance and deallocate it.
[in] | thread | Pointer to dynamically allocated thread object instance. |
Destruct the thread and deallocate the dynamically allocated space using the RTOS system allocator.
delete ptr_th
. os_thread_new()
.Definition at line 671 of file os-c-wrapper.cpp.
void os_thread_destruct | ( | os_thread_t * | thread | ) |
Destruct the statically allocated thread object instance.
[in] | thread | Pointer to thread object instance. |
os_thread_construct()
.Definition at line 625 of file os-c-wrapper.cpp.
os_result_t os_thread_flags_raise | ( | os_thread_t * | thread, |
os_flags_mask_t | mask, | ||
os_flags_mask_t * | oflags | ||
) |
Raise thread event flags.
[in] | thread | Pointer to thread object instance. |
[in] | mask | The OR-ed flags to raise. |
[out] | oflags | Optional pointer where to store the previous flags; may be NULL . |
os_ok | The flags were raised. |
EINVAL | The mask is zero. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
Definition at line 777 of file os-c-wrapper.cpp.
const char * os_thread_get_name | ( | os_thread_t * | thread | ) |
Get the thread name.
[in] | thread | Pointer to thread object instance. |
Definition at line 698 of file os-c-wrapper.cpp.
os_thread_prio_t os_thread_get_priority | ( | os_thread_t * | thread | ) |
Get the thread current scheduling priority.
[in] | thread | Pointer to thread object instance. |
Definition at line 711 of file os-c-wrapper.cpp.
os_thread_stack_t * os_thread_get_stack | ( | os_thread_t * | thread | ) |
Get the thread context stack.
[in] | thread | Pointer to thread object instance. |
Definition at line 826 of file os-c-wrapper.cpp.
os_thread_state_t os_thread_get_state | ( | os_thread_t * | thread | ) |
Get the thread scheduler state.
[in] | thread | Pointer to thread object instance. |
Definition at line 792 of file os-c-wrapper.cpp.
os_thread_user_storage_t * os_thread_get_user_storage | ( | os_thread_t * | thread | ) |
Get the thread user storage.
[in] | thread | Pointer to thread object instance. |
OS_INCLUDE_RTOS_CUSTOM_THREAD_USER_STORAGE
is defined.Definition at line 811 of file os-c-wrapper.cpp.
bool os_thread_is_constructed | ( | os_thread_t * | thread | ) |
Check if the thread is constructed.
[in] | thread | Pointer to thread object instance. |
Definition at line 684 of file os-c-wrapper.cpp.
os_result_t os_thread_join | ( | os_thread_t * | thread, |
void ** | exit_ptr | ||
) |
Wait for thread termination.
[in] | thread | Pointer to terminating thread object instance. |
[in] | exit_ptr | Pointer to thread exit value. (may be NULL). |
os_ok | The thread was terminated. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
Definition at line 751 of file os-c-wrapper.cpp.
os_result_t os_thread_kill | ( | os_thread_t * | thread | ) |
Force thread termination.
[in] | thread | Pointer to thread object instance. |
os_ok | The thread was terminated. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
Definition at line 738 of file os-c-wrapper.cpp.
os_thread_t * os_thread_new | ( | const char * | name, |
os_thread_func_t | func, | ||
const os_thread_func_args_t | args, | ||
const os_thread_attr_t * | attr | ||
) |
Allocate a thread object instance and construct it.
[in] | name | Pointer to name (may be NULL). |
[in] | func | Pointer to thread function. |
[in] | args | Pointer to thread function arguments (may be NULL). |
[in] | attr | Pointer to attributes (may be NULL) |
Dynamically allocate the thread object instance using the RTOS system allocator and construct it.
new thread(...)
. os_thread_delete()
.Definition at line 645 of file os-c-wrapper.cpp.
void os_thread_resume | ( | os_thread_t * | thread | ) |
Resume the thread.
[in] | thread | Pointer to thread object instance. |
Definition at line 764 of file os-c-wrapper.cpp.
os_result_t os_thread_set_priority | ( | os_thread_t * | thread, |
os_thread_prio_t | prio | ||
) |
Set the thread dynamic scheduling priority.
[in] | thread | Pointer to thread object instance. |
[in] | prio | New priority. |
os_ok | The priority was set. |
EPERM | Cannot be invoked from an Interrupt Service Routines. |
EINVAL | The value of prio is invalid for the scheduling policy of the specified thread. |
Definition at line 724 of file os-c-wrapper.cpp.
bool os_thread_stack_check_bottom_magic | ( | os_thread_stack_t * | stack | ) |
Check if bottom magic word is still there.
[in] | stack | Pointer to stack object instance. |
true | The magic word is still there. |
false | The magic word was overwritten. |
Definition at line 941 of file os-c-wrapper.cpp.
bool os_thread_stack_check_top_magic | ( | os_thread_stack_t * | stack | ) |
Check if top magic word is still there.
[in] | stack | Pointer to stack object instance. |
true | The magic word is still there. |
false | The magic word was overwritten. |
Definition at line 954 of file os-c-wrapper.cpp.
size_t os_thread_stack_get_available | ( | os_thread_stack_t * | stack | ) |
Compute how much available stack remains.
[in] | stack | Pointer to stack object instance. |
Definition at line 928 of file os-c-wrapper.cpp.
os_thread_stack_element_t * os_thread_stack_get_bottom | ( | os_thread_stack_t * | stack | ) |
Get the stack lowest reserved address.
[in] | stack | Pointer to stack object instance. |
Definition at line 889 of file os-c-wrapper.cpp.
size_t os_thread_stack_get_default_size | ( | void | ) |
Get the default stack size.
Definition at line 841 of file os-c-wrapper.cpp.
size_t os_thread_stack_get_min_size | ( | void | ) |
Get the min stack size.
Definition at line 865 of file os-c-wrapper.cpp.
size_t os_thread_stack_get_size | ( | os_thread_stack_t * | stack | ) |
Get the stack size.
[in] | stack | Pointer to stack object instance. |
Definition at line 915 of file os-c-wrapper.cpp.
os_thread_stack_element_t * os_thread_stack_get_top | ( | os_thread_stack_t * | stack | ) |
Get the top stack address.
[in] | stack | Pointer to stack object instance. |
Definition at line 902 of file os-c-wrapper.cpp.
size_t os_thread_stack_set_default_size | ( | size_t | size_bytes | ) |
Set the default stack size.
[in] | size_bytes | Default stack size in bytes. |
Definition at line 853 of file os-c-wrapper.cpp.
size_t os_thread_stack_set_min_size | ( | size_t | size_bytes | ) |
Set the min stack size.
[in] | size_bytes | Minimum stack size in bytes. |
Definition at line 877 of file os-c-wrapper.cpp.
os_statistics_counter_t os_thread_stat_get_context_switches | ( | os_thread_t * | thread | ) |
Get the number of thread context switches.
Definition at line 971 of file os-c-wrapper.cpp.
os_statistics_duration_t os_thread_stat_get_cpu_cycles | ( | os_thread_t * | thread | ) |
Get the thread execution time.
Definition at line 988 of file os-c-wrapper.cpp.