28#ifndef CMSIS_PLUS_RTOS_OS_DECLS_H_
29#define CMSIS_PLUS_RTOS_OS_DECLS_H_
36#include <cmsis-plus/os-app-config.h>
38#include <cmsis-plus/rtos/port/os-decls.h>
44#if defined(__cplusplus)
55#pragma GCC diagnostic push
58#pragma clang diagnostic ignored "-Wc++98-compat"
59#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
82 class condition_variable;
441 const char*
const name_ =
"-";
513 operator new (std::size_t bytes);
522 operator new[] (std::size_t bytes);
531 operator new (std::size_t bytes,
void* ptr);
540 operator new[] (std::size_t bytes,
void* ptr);
551 operator delete (
void* ptr, std::size_t bytes);
562 operator delete[] (
void* ptr, std::size_t bytes);
911 port::scheduler::state_t
914 port::scheduler::state_t
917 port::scheduler::state_t
979#if defined(OS_USE_RTOS_PORT_SCHEDULER)
995 using priority_t = uint8_t;
1081#pragma GCC diagnostic pop
1098 os_main (
int argc,
char* argv[]);
1123#define os_assert_err(__e, __er) \
1124 do { if (!(__e)) return __er; } while (false)
1126#define os_assert_err(__e, __er) assert(__e)
1138#define os_assert_throw(__e, __er) \
1139 do { if (!(__e)) os::estd::__throw_system_error(__er, #__e); } while (false)
1141#define os_assert_throw(__e, __er) assert(__e)
1151#if !defined(OS_INTEGER_SYSTICK_FREQUENCY_HZ)
1152#define OS_INTEGER_SYSTICK_FREQUENCY_HZ (1000)
1157#if !defined(OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES)
1158#define OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES (os::rtos::port::stack::default_size_bytes)
1161#if !defined(OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES)
1162#define OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES (os::rtos::port::stack::default_size_bytes)
1165#if !defined(OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE)
1166#define OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE (true)
1169#if !defined(OS_INTEGER_RTOS_REUSE_MAGIC)
1170#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.
int os_main(int argc, char *argv[])
Application entry point, running on the main thread context.
@ 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.