Просмотр исходного кода

Applications: add stack_size to keypad_test and assert in furi thread (#620)

あく 4 лет назад
Родитель
Сommit
bf6c9fe114
2 измененных файлов с 3 добавлено и 2 удалено
  1. 2 2
      applications/applications.c
  2. 1 0
      core/furi/thread.c

+ 2 - 2
applications/applications.c

@@ -144,7 +144,7 @@ const FlipperApplication FLIPPER_SERVICES[] = {
 #endif
 
 #ifdef SRV_KEYPAD_TEST
-    {.app = keypad_test, .name = "keypad_test", .icon = &A_Plugins_14},
+    {.app = keypad_test, .name = "keypad_test", .stack_size = 1024, .icon = &A_Plugins_14},
 #endif
 
 #ifdef SRV_ACCESSOR
@@ -273,7 +273,7 @@ const FlipperApplication FLIPPER_DEBUG_APPS[] = {
 #endif
 
 #ifdef APP_KEYPAD_TEST
-    {.app = keypad_test, .name = "keypad_test", .icon = &A_Plugins_14},
+    {.app = keypad_test, .name = "keypad_test", .stack_size = 1024, .icon = &A_Plugins_14},
 #endif
 
 #ifdef APP_ACCESSOR

+ 1 - 0
core/furi/thread.c

@@ -115,6 +115,7 @@ bool furi_thread_start(FuriThread* thread) {
     furi_assert(thread);
     furi_assert(thread->callback);
     furi_assert(thread->state == FuriThreadStateStopped);
+    furi_assert(thread->attr.stack_size > 0);
     furi_thread_set_state(thread, FuriThreadStateStarting);
     thread->id = osThreadNew(furi_thread_body, thread, &thread->attr);
     if(thread->id) {