mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 03:13:33 +08:00
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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user