-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix defaul stack configuration #273
Conversation
We should reset mLaunchInProgress in case of error, otherwise threads depending on this flag will block forever. Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #273 +/- ##
===========================================
- Coverage 83.65% 83.58% -0.08%
===========================================
Files 157 157
Lines 13990 13971 -19
Branches 1738 1735 -3
===========================================
- Hits 11704 11677 -27
- Misses 2286 2294 +8 ☔ View full report in Codecov by Sentry. |
@@ -61,7 +61,7 @@ class Thread : private NonCopyable { | |||
*/ | |||
~Thread() | |||
{ | |||
#if AOS_CONFIG_THREAD_STACK_GUARD_SIZE != 0 | |||
#if AOS_CONFIG_THREAD_STACK_GUARD_SIZE != 0 && AOS_CONFIG_THREAD_STACK_USAGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please disable include of #include <sys/mman.h> as well
Currently, we define and configure stack by default. It is not convenient as each platform has own minimal stack size that may differ from our stack size. Change stack configuration default behaviour as following: * use auto stack configuration by default: (AOS_CONFIG_THREAD_DEFAULT_STACK_SIZE=0). Do not define or manually configure thread stack; * disable stack usage API by default: (AOS_CONFIG_THREAD_STACK_USAGE=0). Enabling this option requires manual stack size alignment and configuration. AOS_CONFIG_THREAD_DEFAULT_STACK_SIZE and AOS_CONFIG_THREAD_STACK_ALIGN should be define. This option defines stack as static buffer with specified size and alignment and used pthread_attr_setstack API to set thread stack. In all other cases, dedicated pthread API used to configure stack (pthread_attr_setstacksize, pthread_attr_setguardsize). Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
|
No description provided.