framework/st_things : optimize stack size
optimize st_things optimize stack size
@@ -32,21 +32,23 @@ typedef const struct thread_info_s {
int thread_size;
} thread_info_s;
-static const thread_info_s things_stack_thread_name[THINGS_STACK_MAX_INDEX] = { {"THINGS_STACK_PING", 4 * 1024}, /*THINGS_STACK_PING_THREAD */
- {"THINGS_STACK_RESET", 4 * 1024}, /*THINGS_STACK_RESETLOOP_THREAD */
- {"THINGS_STACK_CLOUD_CONNECT", 4 * 1024}, /*THINGS_STACK_CICONNETION_INIT_THREAD */
- {"THINGS_STACK_CICONN_WAIT", 6 * 1024}, /*THINGS_STACK_CICONNETION_WAIT_THREAD */
+static const thread_info_s things_stack_thread_name[THINGS_STACK_MAX_INDEX] = {
+ {"THINGS_STACK_PING", 3 * 1024}, /*THINGS_STACK_PING_THREAD */
+ {"THINGS_STACK_RESET", 3 * 1024}, /*THINGS_STACK_RESETLOOP_THREAD */
+ {"THINGS_STACK_CLOUD_CONNECT", 2 * 1024}, /*THINGS_STACK_CICONNETION_INIT_THREAD */
+ {"THINGS_STACK_CICONN_WAIT", 4 * 1024}, /*THINGS_STACK_CICONNETION_WAIT_THREAD */
{"THINGS_STACK_CLOUD_TOKEN_CHECK", 4 * 1024}, /*THINGS_STACK_CLOUD_TOKEN_CHECK_THREAD */
- {"THINGS_STACK_PRESENCE_NOTI", 4 * 1024}, /*THINGS_STACK_PRESENCE_NOTI_THREAD */
- {"THINGS_STACK_SERVEREXCE_LOOP", 8 * 1024}, /*THINGS_STACK_SERVEREXCETUE_LOOP_THREAD */
- {"THINGS_STACK_TIME_OUT", 4 * 1024}, /*THINGS_STACK_TIME_OUT_THREAD */
- {"THINGS_STACK_ABORT", 4 * 1024}, /*THINGS_STACK_ABORT_THREAD */
- {"THINGS_STACK_WIFI_JOIN", 8 * 1024}, /*THINGS_STACK_WIFI_JOIN_THREAD */
+ {"THINGS_STACK_PRESENCE_NOTI_THREAD", 2 * 1024}, /*THINGS_STACK_PRESENCE_NOTI_THREAD */
+ {"THINGS_STACK_SERVEREXCE_LOOP", 4 * 1024}, /*THINGS_STACK_SERVEREXCETUE_LOOP_THREAD */
+ {"THINGS_STACK_TIME_OUT", 2 * 1024}, /*THINGS_STACK_TIME_OUT_THREAD */
+ {"THINGS_STACK_ABORT", 2 * 1024}, /*THINGS_STACK_ABORT_THREAD */
+ {"THINGS_STACK_WIFI_JOIN", 2 * 1024}, /*THINGS_STACK_WIFI_JOIN_THREAD */
{"THINGS_STACK_FOTA_UPDATE", 6 * 1024}, /*THINGS_STACK_FOTA_THREAD */
- {"THINGS_STACK_AP_INFO_SET", 4 * 1024},/*THINGS_STACK_AP_INFO_SET_THREAD */
- {"THINGS_STACK_MAX_INDEX", 8 * 1024} /*THINGS_STACK_MAX_INDEX */
+ {"THINGS_STACK_AP_INFO_SET", 2 * 1024}, /*THINGS_STACK_AP_INFO_SET_THREAD */
+ {"THINGS_STACK_MAX_INDEX", 2 * 1024} /*THINGS_STACK_MAX_INDEX */
};
+
char *get_pthread_attr_details(things_stack_thread_name_e e_thread_name, pthread_attr_t *pstThread)
{
if (e_thread_name >= THINGS_STACK_MAX_INDEX) {
