浏览代码

[utest] 更改 thread_tc 线程栈的大小,避免 64 位机器导致的栈异常 (#8057)

zhkag 1 年之前
父节点
当前提交
d75090dd16
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      examples/utest/testcases/kernel/thread_tc.c

+ 4 - 4
examples/utest/testcases/kernel/thread_tc.c

@@ -13,7 +13,7 @@
 #include <stdlib.h>
 #include <stdlib.h>
 #include "utest.h"
 #include "utest.h"
 
 
-#define THREAD_STACK_SIZE  512
+#define THREAD_STACK_SIZE  UTEST_THR_STACK_SIZE
 #define THREAD_TIMESLICE   10
 #define THREAD_TIMESLICE   10
 
 
 rt_align(RT_ALIGN_SIZE)
 rt_align(RT_ALIGN_SIZE)
@@ -35,12 +35,12 @@ static volatile rt_uint32_t tid6_finish_flag = 0;
 static volatile rt_uint32_t thread5_source = 0;
 static volatile rt_uint32_t thread5_source = 0;
 
 
 #ifndef RT_USING_SMP
 #ifndef RT_USING_SMP
-    static rt_uint32_t thread_yield_flag = 0;
+    static volatile rt_uint32_t thread_yield_flag = 0;
 #endif
 #endif
-static rt_uint32_t entry_idle_hook_times = 0;
+static volatile rt_uint32_t entry_idle_hook_times = 0;
 static rt_thread_t __current_thread;
 static rt_thread_t __current_thread;
 static rt_uint8_t change_priority;
 static rt_uint8_t change_priority;
-static rt_uint32_t count = 0;
+static volatile rt_uint32_t count = 0;
 
 
 void thread1_entry(void *param)
 void thread1_entry(void *param)
 {
 {