13#ifndef CMSIS_PLUS_RTOS_OS_DECLS_H_
14#define CMSIS_PLUS_RTOS_OS_DECLS_H_
21#if defined(OS_USE_OS_APP_CONFIG_H)
22#include <cmsis-plus/os-app-config.h>
25#include <cmsis-plus/rtos/port/os-decls.h>
31#if defined(__cplusplus)
42#pragma GCC diagnostic push
44#pragma clang diagnostic ignored "-Wc++98-compat"
45#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
68 class condition_variable;
427 const char*
const name_ =
"-";
499 operator new (std::size_t bytes);
508 operator new[] (std::size_t bytes);
517 operator new (std::size_t bytes,
void* ptr);
526 operator new[] (std::size_t bytes,
void* ptr);
537 operator delete (
void* ptr, std::size_t bytes);
548 operator delete[] (
void* ptr, std::size_t bytes);
893 port::scheduler::state_t
896 port::scheduler::state_t
899 port::scheduler::state_t
961#if defined(OS_USE_RTOS_PORT_SCHEDULER)
977 using priority_t = uint8_t;
1063#pragma GCC diagnostic pop
1067#pragma GCC diagnostic push
1068#if defined(__clang__)
1069#elif defined(__GNUC__)
1070#pragma GCC diagnostic ignored "-Waggregate-return"
1074#pragma GCC diagnostic pop
1112#define os_assert_err(__e, __er) \
1113 do { if (!(__e)) return __er; } while (false)
1115#define os_assert_err(__e, __er) assert(__e)
1127#define os_assert_throw(__e, __er) \
1128 do { if (!(__e)) os::estd::__throw_system_error(__er, #__e); } while (false)
1130#define os_assert_throw(__e, __er) assert(__e)
1140#if !defined(OS_INTEGER_SYSTICK_FREQUENCY_HZ)
1141#define OS_INTEGER_SYSTICK_FREQUENCY_HZ (1000)
1146#if !defined(OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES)
1147#define OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES (os::rtos::port::stack::default_size_bytes)
1150#if !defined(OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES)
1151#define OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES (os::rtos::port::stack::default_size_bytes)
1154#if !defined(OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE)
1155#define OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE (true)
1158#if !defined(OS_INTEGER_RTOS_REUSE_MAGIC)
1159#define OS_INTEGER_RTOS_REUSE_MAGIC (0xA55AAA55)
POSIX compliant condition variable.
Synchronised event flags.
Base class for attributes.
~attributes_clocked()=default
Destruct the named object instance.
constexpr attributes_clocked()
Construct a named object instance.
Base class for named system objects.
object_named_system()
Construct a named system object instance.
~object_named_system()=default
Destruct the named system object instance.
Base class for named objects.
object_named()
Construct a named object instance.
const char * name(void) const
Get object name.
~object_named()=default
Destruct the named object instance.
Standard allocator based on the RTOS system default memory manager.
Synchronised memory pool, using the default RTOS allocator.
POSIX compliant message queue, using the default RTOS allocator.
constexpr null_locker()
Construct a null lockable object instance.
~null_locker()
Destruct the null lockable object instance.
void unlock(void)
Pretend to unlock the scheduler.
void lock(void)
Pretend to lock scheduler.
static uint32_t cycles_since_tick(void)
static uint32_t input_clock_frequency_hz(void)
static uint32_t cycles_per_tick(void)
static void internal_interrupt_service_routine(void)
RTC implementation hook.
static result_t wait_for(clock::duration_t ticks)
static void internal_interrupt_service_routine(void)
SysTick implementation hook.
static void create(void *context, void *func, void *args)
static rtos::interrupts::state_t enter(void)
static void exit(rtos::interrupts::state_t state)
critical_section()=delete
static void exit(rtos::interrupts::state_t state)
uncritical_section()=delete
static rtos::interrupts::state_t enter(void)
POSIX compliant semaphore.
POSIX compliant thread, using the default RTOS allocator.
User single-shot or periodic timer.
@ all
Return when all flags are set.
@ clear
Ask for flags to be cleared after read.
@ any
Return when at least one flag is set.
@ any
Special mask to represent any flag.
uint32_t mode_t
Type of variables holding flags modes.
uint32_t mask_t
Type of variables holding flags masks.
port::interrupts::state_t state_t
Type of variables holding interrupts statu codes.
uint32_t duration_t
Type of variables holding timer durations.
uint64_t timestamp_t
Type of variables holding time stamps.
bool in_handler_mode(void)
port::scheduler::state_t unlock(void)
port::scheduler::state_t lock(void)
void _wait_for_interrupt(void)
result_t initialize(void)
stack::element_t * switch_stacks(stack::element_t *sp)
void prepare_suspend(void)
@ ok
Function completed; no errors or events occurred.
port::scheduler::state_t state_t
Type of variables holding scheduler state codes.
uint64_t duration_t
Type of variables holding durations in CPU cycles.
uint64_t counter_t
Type of variables holding context switches counters.
uint32_t result_t
Type of values returned by RTOS functions.
A namespace for functions applying to the current thread.