-
Notifications
You must be signed in to change notification settings - Fork 729
Set APP_THREAD_STACK_SIZE_DEFAULT of nuttx #779
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
Conversation
| /* Default/min/max stack size of each app thread */ | ||
| #if !defined(BH_PLATFORM_ZEPHYR) && !defined(BH_PLATFORM_ALIOS_THINGS) \ | ||
| #ifdef BH_PLATFORM_NUTTX | ||
| #define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT |
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.
Does these macro defined in POSIX standard?
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.
Yes.
| #define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT | ||
| #define APP_THREAD_STACK_SIZE_MIN PTHREAD_STACK_MIN | ||
| #else | ||
| #define APP_THREAD_STACK_SIZE_DEFAULT (32 * 1024) |
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.
Replace the hard coded size with PTHREAD_STACK_DEFAULT and PTHREAD_STACK_MIN on POSIX compatible system ?
Please take a look ? @wenyongh
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.
How about change to:
#if defined(BH_PLATFORM_ZEPHYR) || defined(BH_PLATFORM_ALIOS_THINGS) \
|| defined(BH_PLATFORM_ESP_IDF) || defined(BH_PLATFORM_OPENRTOS)
#define APP_THREAD_STACK_SIZE_DEFAULT (6 * 1024)
#define APP_THREAD_STACK_SIZE_MIN (4 * 1024)
#elif defined(PTHREAD_STACK_DEFAULT) && defined(PTHREAD_STACK_MIN)
#define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT
#define APP_THREAD_STACK_SIZE_MIN PTHREAD_STACK_MIN
#else
#define APP_THREAD_STACK_SIZE_DEFAULT (32 * 1024)
#define APP_THREAD_STACK_SIZE_MIN (24 * 1024)
#endifThere 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.
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.
ok, thank you all.
N/A Signed-off-by: zhouliang3 <[email protected]> Change-Id: I7ea16fdb91ea9bc9215a9dee7c983192d990b87c
Set APP_THREAD_STACK_SIZE_DEFAULT/MIN for POSIX platforms (#779)
…liance#779) Set APP_THREAD_STACK_SIZE_DEFAULT/MIN to PTHREAD_STACK_DEFAULT/MIN when the macros are defined. Signed-off-by: zhouliang3 <[email protected]>
No description provided.