[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1341: Call c++ global variables in nxtask_startup

2020-07-01 Thread GitBox
patacongo edited a comment on pull request #1341: URL: https://github.com/apache/incubator-nuttx/pull/1341#issuecomment-652442424 > > Look how I did the pthread startup function in PR #1328. This is EXACTLY the same issue. I created a user-space pthread_startup (NOT and OS startup function

[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1341: Call c++ global variables in nxtask_startup

2020-07-01 Thread GitBox
patacongo edited a comment on pull request #1341: URL: https://github.com/apache/incubator-nuttx/pull/1341#issuecomment-652442424 > > Look how I did the pthread startup function in PR #1328. This is EXACTLY the same issue. I created a user-space pthread_startup (NOT and OS startup function

[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1341: Call c++ global variables in nxtask_startup

2020-06-30 Thread GitBox
patacongo edited a comment on pull request #1341: URL: https://github.com/apache/incubator-nuttx/pull/1341#issuecomment-652127320 It is an incorrect design to call C++ constructors or destructors from the OS in kernel mode (PROTECTED and KERNEL builds) or with interrupts disabled. Calling

[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1341: Call c++ global variables in nxtask_startup

2020-06-30 Thread GitBox
patacongo edited a comment on pull request #1341: URL: https://github.com/apache/incubator-nuttx/pull/1341#issuecomment-652127933 Think of how this is done in Linux: Each task has a wrapper function called __start in crt0.S and will handle both constructors and destructors. And the first

[GitHub] [incubator-nuttx] patacongo edited a comment on pull request #1341: Call c++ global variables in nxtask_startup

2020-06-30 Thread GitBox
patacongo edited a comment on pull request #1341: URL: https://github.com/apache/incubator-nuttx/pull/1341#issuecomment-652127320 It is an incorrect design to call C++ destructors from the OS in kernel mode (PROTECTED and KERNEL builds) or with interrupts disabled. Calling the destructors