diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-28 23:38:59 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-02-28 23:38:59 +0000 |
commit | 157e80bb9dd6959a83a8f844318b42b0dc8b7beb (patch) | |
tree | 8b7224b8a792bd3a3d8b10eb7cb45abbeb32e1b7 /apps/examples/nsh/nsh_main.c | |
parent | 82da59c616d91ae6c8cba72b74d38ac3eefb0af5 (diff) | |
download | px4-firmware-157e80bb9dd6959a83a8f844318b42b0dc8b7beb.tar.gz px4-firmware-157e80bb9dd6959a83a8f844318b42b0dc8b7beb.tar.bz2 px4-firmware-157e80bb9dd6959a83a8f844318b42b0dc8b7beb.zip |
Add logic to NSH startup to call C++ static initializers on startup
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4439 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'apps/examples/nsh/nsh_main.c')
-rw-r--r-- | apps/examples/nsh/nsh_main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/examples/nsh/nsh_main.c b/apps/examples/nsh/nsh_main.c index 5d302e397..1d1592b4d 100644 --- a/apps/examples/nsh/nsh_main.c +++ b/apps/examples/nsh/nsh_main.c @@ -45,6 +45,8 @@ #include <sched.h> #include <errno.h> +#include <nuttx/arch.h> + #include <apps/nsh.h> /**************************************************************************** @@ -84,6 +86,12 @@ int user_start(int argc, char *argv[]) int exitval = 0; int ret; + /* Call all C++ static constructors */ + +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) + up_cxxinitialize(); +#endif + /* Initialize the NSH library */ nsh_initialize(); |