rdmstartuptypes.h File Reference

RDM Startup Macros used by examples, tools, and tests. More...

#include "psptypes.h"
#include "rdmretcodetypes.h"
Include dependency graph for rdmstartuptypes.h:
This graph shows which files directly or indirectly include this file:

Macros

#define RDM_STARTUP_HOOK
#define RDM_SHUTDOWN_HOOK
#define RDM_STARTUP_EXAMPLE(name)

Detailed Description

RDM Startup Macros used by examples, tools, and tests.

Macro Definition Documentation

RDM_SHUTDOWN_HOOK

#define RDM_SHUTDOWN_HOOK

Shutdown hook

Shutdown hook for examples, tools, and tests that are using any of the RDM_STARTUP macros

RDM_STARTUP_EXAMPLE

#define RDM_STARTUP_EXAMPLE ( name )
Value:
int32_t main_##name (int32_t argc, const char *const *argv); \
int main (int argc, const char *const *argv) \
{ \
int32_t status; \
\
RDM_STARTUP_HOOK \
status = rdm_threadMain (main_##name, argc, argv); \
RDM_SHUTDOWN_HOOK \
return status; \
}

Startup for examples

This sets up a main function, with a startup hook, a call to a named main function, and a shutdown hook.

On some embedded platforms you may want to define RDM_STARTUP_HOOK to change the current working directory or do some other environment setup.

The named main function has the name main_NAME, where NAME is the parameter to this macro. This macro sets up a call to rdm_threadMain which in turn will call the named main function. Exactly what rdm_threadMain does is an implementation detail.

Examples
core01Example_main.c, core02Example_main.c, core03Example_main.c, core04Example_main.c, core05Example_main.c, core06Example_main.c, core07Example_main.c, core08Example_main.c, core09Example_main.c, core10Example_main.c, core11Example_main.c, core12Example_main.c, core13Example_main.c, core14Example_main.c, core15Example_main.c, core16Example_main.c, core17Example_main.c, core18Example_main.c, core19Example_main.c, core20Example_main.c, core21Example_main.c, core22Example_main.c, core23Example_main.c, core24Example_main.c, core25Example_main.c, core28Example_main.c, core29Example_main.c, core30Example_main.c, core31Example_main.c, core32Example_main.c, core33Example_main.c, core34Example_main.c, core35Example_main.c, cpp01Example_main.cpp, cpp35Example_main.cpp, cpp50Example_main.cpp, cpp55Example_main.cpp, learn/bookStore_vxWorks7.c, and odbc01Example_main.c.

RDM_STARTUP_HOOK

#define RDM_STARTUP_HOOK

Startup hook

Startup hook for examples, tools, and tests that are using any of the RDM_STARTUP macros

int32_t rdm_threadMain(int32_t(*main)(int32_t argc, const char *const *argv), int argc, const char *const *argv)
Start the main thread and call the named main function.