oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
app.hpp File Reference

Application entry point macro and scheduler start. More...

#include <ove/app.h>
#include <ove/types.hpp>
Include dependency graph for app.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  ove
 Top-level namespace for all oveRTOS C++ abstractions.
 

Macros

#define OVE_MAIN()
 Convenience macro that defines the oveRTOS application entry point.
 

Functions

void ove::run ()
 Starts the oveRTOS scheduler and enters the main event loop.
 

Detailed Description

Application entry point macro and scheduler start.

Macro Definition Documentation

◆ OVE_MAIN

#define OVE_MAIN ( )
Value:
static void ove_main_impl(); \
extern "C" void ove_main(void) \
{ \
ove_main_impl(); \
} \
static void ove_main_impl()

Convenience macro that defines the oveRTOS application entry point.

Declares a static ove_main_impl() function and bridges it to the C ove_main() symbol expected by the oveRTOS runtime. Usage:

static ove::audio::Graph graph; // static local — outlives this scope
setup(&graph);
}
#define OVE_MAIN()
Convenience macro that defines the oveRTOS application entry point.
Definition app.hpp:61
C++ wrapper around ove_audio_graph.
Definition audio.hpp:72
void run()
Starts the oveRTOS scheduler and enters the main event loop.
Definition app.hpp:28
Note
Object lifetime: any object inside OVE_MAIN() that a worker thread keeps a reference to must have storage that outlives this scope. Use a static local (as above), a file-scope variable, or heap allocation. Plain stack locals get popped when OVE_MAIN() unwinds and any captured pointer becomes dangling — the standard C++ rule for "don't return a pointer to a local", applied to workers instead of callers. On FreeRTOS the failure is immediate because the scheduler reclaims the main stack when it starts; on POSIX and others it is latent but still UB.