Explorar o código

[dm][core] add common stack size for DM

DM driver is public, they don't know the size of the thread stack default.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
GuEe-GUI hai 3 meses
pai
achega
c74148a8b3
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      components/drivers/include/drivers/core/dm.h

+ 8 - 0
components/drivers/include/drivers/core/dm.h

@@ -31,6 +31,14 @@ extern int rt_hw_cpu_id(void);
 #define RT_MAX_IPI 0
 #define RT_MAX_IPI 0
 #endif
 #endif
 
 
+#ifndef DM_THREAD_STACK_SIZE
+#ifdef SYSTEM_THREAD_STACK_SIZE
+#define DM_THREAD_STACK_SIZE    SYSTEM_THREAD_STACK_SIZE
+#else
+#define DM_THREAD_STACK_SIZE    IDLE_THREAD_STACK_SIZE
+#endif
+#endif
+
 void rt_dm_secondary_cpu_init(void);
 void rt_dm_secondary_cpu_init(void);
 
 
 /* ID Allocation */
 /* ID Allocation */