µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os-c-api.h File Reference
#include <cmsis-plus/rtos/os-c-decls.h>
#include <cmsis-plus/rtos/os-hooks.h>
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

Compatibility Macros
#define os_condvar_create   os_condvar_construct
 
#define os_condvar_destroy   os_condvar_destruct
 
#define os_evflags_create   os_evflags_construct
 
#define os_evflags_destroy   os_evflags_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_mutex_create   os_mutex_construct
 
#define os_mutex_destroy   os_mutex_destruct
 
#define os_mutex_recursive_create   os_mutex_recursive_construct
 
#define os_semaphore_binary_create   os_semaphore_binary_construct
 
#define os_semaphore_counting_create   os_semaphore_counting_construct
 
#define os_semaphore_create   os_semaphore_construct
 
#define os_semaphore_destroy   os_semaphore_destruct
 
#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
 

Enumerations

Return Codes
enum  { os_ok = 0 }
 Return codes, in addition to POSIX codes. More...
 

Functions

Main Thread Function
int os_main (int argc, char *argv[])
 Application entry point, running on the main thread context.
 
Scheduler Functions
os_result_t os_sched_initialize (void)
 Initialise the RTOS scheduler.
 
bool os_sched_is_locked (void)
 Check if the scheduler is locked.
 
bool os_sched_is_preemptive (void)
 Check if the scheduler is in preemptive mode.
 
bool os_sched_is_started (void)
 Check if the scheduler was started.
 
os_sched_state_t os_sched_lock (void)
 Lock the scheduler.
 
os_sched_state_t os_sched_set_locked (os_sched_state_t state)
 Lock/unlock the scheduler.
 
bool os_sched_set_preemptive (bool state)
 Set the scheduler preemptive mode.
 
void os_sched_start (void)
 Start the RTOS scheduler.
 
os_sched_state_t os_sched_unlock (void)
 Unlock the scheduler.
 
Scheduler Statistics Functions
os_statistics_counter_t os_sched_stat_get_context_switches (void)
 Get the total number of context switches.
 
os_statistics_duration_t os_sched_stat_get_cpu_cycles (void)
 Get the total duration of all threads.
 
Interrupts Functions
os_irq_state_t os_irq_critical_enter (void)
 Enter an interrupts critical section.
 
void os_irq_critical_exit (os_irq_state_t state)
 Exit the interrupts critical section.
 
os_thread_stack_tos_irq_get_stack (void)
 Get the interrupts stack.
 
bool os_irq_in_handler_mode (void)
 Check if the CPU is in handler mode.
 
os_irq_state_t os_irq_uncritical_enter (void)
 Enter an interrupts uncritical section.
 
void os_irq_uncritical_exit (os_irq_state_t state)
 Exit the interrupts uncritical section.
 
Current Thread Functions
os_thread_tos_this_thread (void)
 Get the current running thread.
 
void os_this_thread_exit (void *exit_ptr)
 Terminate the current running thread.
 
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.
 
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_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_wait (os_flags_mask_t mask, os_flags_mask_t *oflags, os_flags_mode_t mode)
 Wait for thread event flags.
 
void os_this_thread_suspend (void)
 Suspend the current running thread to wait for an event.
 
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_delete (os_thread_t *thread)
 Destruct the thread object instance and deallocate it.
 
void os_thread_destruct (os_thread_t *thread)
 Destruct the statically allocated thread object instance.
 
bool os_thread_is_constructed (os_thread_t *thread)
 Check if the thread is constructed.
 
os_thread_tos_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.
 
Thread Functions
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.
 
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_thread_stack_tos_thread_get_stack (os_thread_t *thread)
 Get the thread context stack.
 
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_result_t os_thread_join (os_thread_t *thread, void **exit_ptr)
 Wait for thread termination.
 
os_result_t os_thread_kill (os_thread_t *thread)
 Force thread termination.
 
void os_thread_resume (os_thread_t *thread)
 Resume the thread.
 
os_result_t os_thread_set_priority (os_thread_t *thread, os_thread_prio_t prio)
 Set the thread dynamic scheduling priority.
 
Thread Stack Functions
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.
 
size_t os_thread_stack_get_available (os_thread_stack_t *stack)
 Compute how much available stack remains.
 
os_thread_stack_element_tos_thread_stack_get_bottom (os_thread_stack_t *stack)
 Get the stack lowest reserved address.
 
size_t os_thread_stack_get_default_size (void)
 Get the default stack size.
 
size_t os_thread_stack_get_min_size (void)
 Get the min stack size.
 
size_t os_thread_stack_get_size (os_thread_stack_t *stack)
 Get the stack size.
 
os_thread_stack_element_tos_thread_stack_get_top (os_thread_stack_t *stack)
 Get the top stack address.
 
size_t os_thread_stack_set_default_size (size_t size_bytes)
 Set the default stack size.
 
size_t os_thread_stack_set_min_size (size_t size_bytes)
 Set the min stack size.
 
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_tos_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.
 
Clock Functions
os_clock_tos_clock_get_hrclock (void)
 Get hrclock (the high resolution clock).
 
const char * os_clock_get_name (os_clock_t *clock)
 Get the clock name.
 
os_clock_offset_t os_clock_get_offset (os_clock_t *clock)
 Get adjustment offset.
 
os_clock_tos_clock_get_rtclock (void)
 Get rtclock (the real-time clock).
 
os_clock_tos_clock_get_sysclock (void)
 Get sysclock (the system clock).
 
os_clock_timestamp_t os_clock_now (os_clock_t *clock)
 Tell the current time, possibly adjusted for epoch.
 
os_clock_offset_t os_clock_set_offset (os_clock_t *clock, os_clock_offset_t offset)
 Set adjustment offset.
 
os_result_t os_clock_sleep_for (os_clock_t *clock, os_clock_duration_t duration)
 Sleep for a relative duration.
 
os_result_t os_clock_sleep_until (os_clock_t *clock, os_clock_timestamp_t timestamp)
 Sleep until an absolute timestamp.
 
os_clock_timestamp_t os_clock_steady_now (os_clock_t *clock)
 Tell the current time since startup.
 
os_result_t os_clock_wait_for (os_clock_t *clock, os_clock_duration_t timeout)
 Timed wait for an event.
 
os_clock_timestamp_t os_sysclock_now (void)
 Tell the current time since startup.
 
os_result_t os_sysclock_sleep_for (os_clock_duration_t duration)
 Sleep for a relative duration.
 
os_result_t os_sysclock_sleep_until (os_clock_timestamp_t timestamp)
 Sleep until an absolute timestamp.
 
os_clock_duration_t os_sysclock_ticks_cast (uint32_t microsec)
 Convert microseconds to ticks.
 
os_clock_duration_t os_sysclock_ticks_cast_long (uint64_t microsec)
 Convert microseconds to ticks.
 
os_result_t os_sysclock_wait_for (os_clock_duration_t timeout)
 Timed wait for an event.
 
Timer Attribute Functions
const os_timer_attr_tos_timer_attr_get_periodic (void)
 Get a periodic timer attributes object instance.
 
void os_timer_attr_init (os_timer_attr_t *attr)
 Initialise the single shot timer attributes.
 
void os_timer_attr_periodic_init (os_timer_attr_t *attr)
 Initialise the periodic timer attributes.
 
Timer Creation Functions
void os_timer_construct (os_timer_t *timer, const char *name, os_timer_func_t function, os_timer_func_args_t args, const os_timer_attr_t *attr)
 Construct a statically allocated timer object instance.
 
void os_timer_delete (os_timer_t *timer)
 Destruct the timer object instance and deallocate it.
 
void os_timer_destruct (os_timer_t *timer)
 Destruct the statically allocated timer object instance.
 
os_timer_tos_timer_new (const char *name, os_timer_func_t function, os_timer_func_args_t args, const os_timer_attr_t *attr)
 Allocate a timer object instance and construct it.
 
Timer Functions
const char * os_timer_get_name (os_timer_t *timer)
 Get the timer name.
 
os_result_t os_timer_start (os_timer_t *timer, os_clock_duration_t period)
 Start or restart the timer.
 
os_result_t os_timer_stop (os_timer_t *timer)
 Stop the timer.
 
Mutex Attributes Functions
const os_mutex_attr_tos_mutex_attr_get_recursive (void)
 Get a recursive mutex attributes object instance.
 
void os_mutex_attr_init (os_mutex_attr_t *attr)
 Initialise the mutex attributes.
 
void os_mutex_attr_recursive_init (os_mutex_attr_t *attr)
 Initialise the recursive mutex attributes.
 
Mutex Creation Functions
void os_mutex_construct (os_mutex_t *mutex, const char *name, const os_mutex_attr_t *attr)
 Construct a statically allocated mutex object instance.
 
void os_mutex_delete (os_mutex_t *mutex)
 Destruct the mutex object instance and deallocate it.
 
void os_mutex_destruct (os_mutex_t *mutex)
 Destruct the statically allocated mutex object instance.
 
os_mutex_tos_mutex_new (const char *name, const os_mutex_attr_t *attr)
 Allocate a mutex object instance and construct it.
 
void os_mutex_recursive_construct (os_mutex_t *mutex, const char *name, const os_mutex_attr_t *attr)
 Construct a statically allocated recursive mutex object instance.
 
os_mutex_tos_mutex_recursive_new (const char *name, const os_mutex_attr_t *attr)
 Allocated a recursive mutex object instance and construct it.
 
Mutex Functions
const char * os_mutex_get_name (os_mutex_t *mutex)
 Get the mutex name.
 
os_thread_tos_mutex_get_owner (os_mutex_t *mutex)
 Get the thread that owns the mutex.
 
os_thread_prio_t os_mutex_get_prio_ceiling (os_mutex_t *mutex)
 Get the priority ceiling of a mutex.
 
os_mutex_protocol_t os_mutex_get_protocol (os_mutex_t *mutex)
 Get the mutex protocol.
 
os_mutex_robustness_t os_mutex_get_robustness (os_mutex_t *mutex)
 Get the mutex robustness.
 
os_mutex_type_t os_mutex_get_type (os_mutex_t *mutex)
 Get the mutex type.
 
os_result_t os_mutex_lock (os_mutex_t *mutex)
 Lock/acquire the mutex.
 
os_result_t os_mutex_mark_consistent (os_mutex_t *mutex)
 Mark mutex as consistent.
 
os_result_t os_mutex_reset (os_mutex_t *mutex)
 Reset the mutex.
 
os_result_t os_mutex_set_prio_ceiling (os_mutex_t *mutex, os_thread_prio_t prio_ceiling, os_thread_prio_t *old_prio_ceiling)
 Change the priority ceiling of a mutex.
 
os_result_t os_mutex_timed_lock (os_mutex_t *mutex, os_clock_duration_t timeout)
 Timed attempt to lock/acquire the mutex.
 
os_result_t os_mutex_try_lock (os_mutex_t *mutex)
 Try to lock/acquire the mutex.
 
os_result_t os_mutex_unlock (os_mutex_t *mutex)
 Unlock/release the mutex.
 
Condition Variable Attributes Functions
void os_condvar_attr_init (os_condvar_attr_t *attr)
 Initialise the condition variable attributes.
 
Condition Variable Creation Functions
void os_condvar_construct (os_condvar_t *condvar, const char *name, const os_condvar_attr_t *attr)
 Construct a statically allocated condition variable object instance.
 
void os_condvar_delete (os_condvar_t *condvar)
 Destruct the condition variable object instance and deallocate it.
 
void os_condvar_destruct (os_condvar_t *condvar)
 Destruct the statically allocated condition variable object instance.
 
os_condvar_tos_condvar_new (const char *name, const os_condvar_attr_t *attr)
 Allocate a condition variable object instance and construct it.
 
Condition Variable Functions
os_result_t os_condvar_broadcast (os_condvar_t *condvar)
 Notify all threads waiting for a condition variable.
 
const char * os_condvar_get_name (os_condvar_t *condvar)
 Get the condition variable name.
 
os_result_t os_condvar_signal (os_condvar_t *condvar)
 Notify one thread waiting for a condition variable.
 
os_result_t os_condvar_timed_wait (os_condvar_t *condvar, os_mutex_t *mutex, os_clock_duration_t timeout)
 Timed wait for a condition variable to be notified.
 
os_result_t os_condvar_wait (os_condvar_t *condvar, os_mutex_t *mutex)
 Wait for a condition variable to be notified.
 
Semaphore Attributes Functions
void os_semaphore_attr_binary_init (os_semaphore_attr_t *attr, const os_semaphore_count_t initial_value)
 Initialise the binary semaphore attributes.
 
void os_semaphore_attr_counting_init (os_semaphore_attr_t *attr, const os_semaphore_count_t max_value, const os_semaphore_count_t initial_value)
 Initialise the counting semaphore attributes.
 
const os_semaphore_attr_tos_semaphore_attr_get_binary (void)
 Get a binary semaphore attributes object instance.
 
void os_semaphore_attr_init (os_semaphore_attr_t *attr)
 Initialise the counting semaphore attributes.
 
Semaphore Creation Functions
void os_semaphore_binary_construct (os_semaphore_t *semaphore, const char *name, const os_semaphore_count_t initial_value)
 Construct a statically allocated binary semaphore object instance.
 
os_semaphore_tos_semaphore_binary_new (const char *name, const os_semaphore_count_t initial_value)
 Allocate a binary semaphore object instance and construct it.
 
void os_semaphore_construct (os_semaphore_t *semaphore, const char *name, const os_semaphore_attr_t *attr)
 Construct a statically allocated semaphore object instance.
 
void os_semaphore_counting_construct (os_semaphore_t *semaphore, const char *name, const os_semaphore_count_t max_value, const os_semaphore_count_t initial_value)
 Construct a statically allocated counting semaphore object instance.
 
os_semaphore_tos_semaphore_counting_new (const char *name, const os_semaphore_count_t max_value, const os_semaphore_count_t initial_value)
 Allocate a counting semaphore object instance and construct it.
 
void os_semaphore_delete (os_semaphore_t *semaphore)
 Destruct the semaphore object instance.
 
void os_semaphore_destruct (os_semaphore_t *semaphore)
 Destruct the statically allocated semaphore object instance.
 
os_semaphore_tos_semaphore_new (const char *name, const os_semaphore_attr_t *attr)
 Allocated a semaphore object instance and construct it.
 
Semaphore Functions
os_semaphore_count_t os_semaphore_get_initial_value (os_semaphore_t *semaphore)
 Get the semaphore initial count value.
 
os_semaphore_count_t os_semaphore_get_max_value (os_semaphore_t *semaphore)
 Get the semaphore maximum count value.
 
const char * os_semaphore_get_name (os_semaphore_t *semaphore)
 Get the semaphore name.
 
os_semaphore_count_t os_semaphore_get_value (os_semaphore_t *semaphore)
 Get the semaphore count value.
 
os_result_t os_semaphore_post (os_semaphore_t *semaphore)
 Post (unlock) the semaphore.
 
os_result_t os_semaphore_reset (os_semaphore_t *semaphore)
 Reset the semaphore.
 
os_result_t os_semaphore_timed_wait (os_semaphore_t *semaphore, os_clock_duration_t timeout)
 Timed wait to lock the semaphore.
 
os_result_t os_semaphore_try_wait (os_semaphore_t *semaphore)
 Try to lock the semaphore.
 
os_result_t os_semaphore_wait (os_semaphore_t *semaphore)
 Lock the semaphore, possibly waiting.
 
Memory Pool Attributes Functions
void os_mempool_attr_init (os_mempool_attr_t *attr)
 Initialise the memory pool attributes.
 
Memory Pool Creation Functions
void os_mempool_construct (os_mempool_t *mempool, const char *name, size_t blocks, size_t block_size_bytes, const os_mempool_attr_t *attr)
 Construct a statically allocated memory pool object instance.
 
void os_mempool_delete (os_mempool_t *mempool)
 Destruct the memory pool object instance and deallocate it.
 
void os_mempool_destruct (os_mempool_t *mempool)
 Destruct the statically allocated memory pool object instance.
 
os_mempool_tos_mempool_new (const char *name, size_t blocks, size_t block_size_bytes, const os_mempool_attr_t *attr)
 Allocate a memory pool object instance and construct it.
 
Memory Pool Functions
void * os_mempool_alloc (os_mempool_t *mempool)
 Allocate a memory block.
 
os_result_t os_mempool_free (os_mempool_t *mempool, void *block)
 Free the memory block.
 
size_t os_mempool_get_block_size (os_mempool_t *mempool)
 Get block size.
 
size_t os_mempool_get_capacity (os_mempool_t *mempool)
 Get memory pool capacity.
 
size_t os_mempool_get_count (os_mempool_t *mempool)
 Get blocks count.
 
const char * os_mempool_get_name (os_mempool_t *mempool)
 Get the memory pool name.
 
void * os_mempool_get_pool (os_mempool_t *mempool)
 Get the pool storage address.
 
bool os_mempool_is_empty (os_mempool_t *mempool)
 Check if the memory pool is empty.
 
bool os_mempool_is_full (os_mempool_t *mempool)
 Check if the memory pool is full.
 
os_result_t os_mempool_reset (os_mempool_t *mempool)
 Reset the memory pool.
 
void * os_mempool_timed_alloc (os_mempool_t *mempool, os_clock_duration_t timeout)
 Allocate a memory block with timeout.
 
void * os_mempool_try_alloc (os_mempool_t *mempool)
 Try to allocate a memory block.
 
Message Queue Attributes Functions
void os_mqueue_attr_init (os_mqueue_attr_t *attr)
 Initialise the message queue attributes.
 
Message Queue Creation Functions
void os_mqueue_construct (os_mqueue_t *mqueue, const char *name, size_t msgs, size_t msg_size_bytes, const os_mqueue_attr_t *attr)
 Construct a statically allocated message queue object instance.
 
void os_mqueue_delete (os_mqueue_t *mqueue)
 Destruct the message queue object instance and deallocate it.
 
void os_mqueue_destruct (os_mqueue_t *mqueue)
 Destruct the statically allocated message queue object instance.
 
os_mqueue_tos_mqueue_new (const char *name, size_t msgs, size_t msg_size_bytes, const os_mqueue_attr_t *attr)
 Allocate a message queue object instance and construct it.
 
Message Queue Functions
size_t os_mqueue_get_capacity (os_mqueue_t *mqueue)
 Get queue capacity.
 
size_t os_mqueue_get_length (os_mqueue_t *mqueue)
 Get queue length.
 
size_t os_mqueue_get_msg_size (os_mqueue_t *mqueue)
 Get message size.
 
const char * os_mqueue_get_name (os_mqueue_t *mqueue)
 Get the message queue name.
 
bool os_mqueue_is_empty (os_mqueue_t *mqueue)
 Check if the queue is empty.
 
bool os_mqueue_is_full (os_mqueue_t *mqueue)
 Check if the queue is full.
 
os_result_t os_mqueue_receive (os_mqueue_t *mqueue, void *msg, size_t nbytes, os_mqueue_prio_t *mprio)
 Receive a message from the queue.
 
os_result_t os_mqueue_reset (os_mqueue_t *mqueue)
 Reset the message queue.
 
os_result_t os_mqueue_send (os_mqueue_t *mqueue, const void *msg, size_t nbytes, os_mqueue_prio_t mprio)
 Send a message to the queue.
 
os_result_t os_mqueue_timed_receive (os_mqueue_t *mqueue, void *msg, size_t nbytes, os_clock_duration_t timeout, os_mqueue_prio_t *mprio)
 Receive a message from the queue with timeout.
 
os_result_t os_mqueue_timed_send (os_mqueue_t *mqueue, const void *msg, size_t nbytes, os_clock_duration_t timeout, os_mqueue_prio_t mprio)
 Send a message to the queue with timeout.
 
os_result_t os_mqueue_try_receive (os_mqueue_t *mqueue, void *msg, size_t nbytes, os_mqueue_prio_t *mprio)
 Try to receive a message from the queue.
 
os_result_t os_mqueue_try_send (os_mqueue_t *mqueue, const void *msg, size_t nbytes, os_mqueue_prio_t mprio)
 Try to send a message to the queue.
 
Event Flags Attributes Functions
void os_evflags_attr_init (os_evflags_attr_t *attr)
 Initialise the event flags attributes.
 
Event Flags Creation Functions
void os_evflags_construct (os_evflags_t *evflags, const char *name, const os_evflags_attr_t *attr)
 Construct a statically allocated event flags object instance.
 
void os_evflags_delete (os_evflags_t *evflags)
 Destruct the event flags object instance and deallocate it.
 
void os_evflags_destruct (os_evflags_t *evflags)
 Destruct the statically allocated event flags object instance.
 
os_evflags_tos_evflags_new (const char *name, const os_evflags_attr_t *attr)
 Allocate an event flags object instance and construct it.
 
Event Flags Functions
bool os_evflags_are_waiting (os_evflags_t *evflags)
 Check if there are threads waiting.
 
os_result_t os_evflags_clear (os_evflags_t *evflags, os_flags_mask_t mask, os_flags_mask_t *oflags)
 Clear event flags.
 
os_flags_mask_t os_evflags_get (os_evflags_t *evflags, os_flags_mask_t mask, os_flags_mode_t mode)
 Get (and possibly clear) event flags.
 
const char * os_evflags_get_name (os_evflags_t *evflags)
 Get the event flags name.
 
os_result_t os_evflags_raise (os_evflags_t *evflags, os_flags_mask_t mask, os_flags_mask_t *oflags)
 Raise event flags.
 
os_result_t os_evflags_timed_wait (os_evflags_t *evflags, os_flags_mask_t mask, os_clock_duration_t timeout, os_flags_mask_t *oflags, os_flags_mode_t mode)
 Timed wait for event flags.
 
os_result_t os_evflags_try_wait (os_evflags_t *evflags, os_flags_mask_t mask, os_flags_mask_t *oflags, os_flags_mode_t mode)
 Try to wait for event flags.
 
os_result_t os_evflags_wait (os_evflags_t *evflags, os_flags_mask_t mask, os_flags_mask_t *oflags, os_flags_mode_t mode)
 Wait for event flags.
 
Memory Management Functions
void * os_memory_allocate (os_memory_t *memory, size_t bytes, size_t alignment)
 Allocate a block of memory.
 
bool os_memory_coalesce (os_memory_t *memory)
 Coalesce free blocks.
 
void os_memory_deallocate (os_memory_t *memory, void *addr, size_t bytes, size_t alignment)
 Deallocate the previously allocated block of memory.
 
size_t os_memory_get_allocated_bytes (os_memory_t *memory)
 Get the total size of allocated chunks.
 
size_t os_memory_get_allocated_chunks (os_memory_t *memory)
 Get the number of allocated chunks.
 
os_memory_tos_memory_get_default (void)
 Get the application default memory resource (free store).
 
size_t os_memory_get_free_bytes (os_memory_t *memory)
 Get the total size of free chunks.
 
size_t os_memory_get_free_chunks (os_memory_t *memory)
 Get the number of free chunks.
 
size_t os_memory_get_total_bytes (os_memory_t *memory)
 Get the total size of managed memory.
 
void os_memory_reset (os_memory_t *memory)
 Reset the memory manager to the initial state.