Add logic to NSH startup to call C++ static initializers on startup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4439 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
e04a0ef9bc
commit
fafd67fe82
@ -198,3 +198,5 @@
|
||||
keyboard mappings of the Backspace key. Submitted by Mike Smith.
|
||||
* apps/examples/cdcacm: An example that illustrates how the CDC/ACM driver
|
||||
may to connected and disconnected through software control.
|
||||
* apps/examples/nsh/nsh_main.c: If available, call up_cxxinitialize() to
|
||||
initialize all statically defined C++ classes.
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user