Explorar el Código

适配5.0.1: 更新 thread 结构体成员 (#26)

Shicheng Chu hace 2 años
padre
commit
d7af6fafa0
Se han modificado 2 ficheros con 8 adiciones y 0 borrados
  1. 4 0
      en/scheduler_hook.c
  2. 4 0
      zh/scheduler_hook.c

+ 4 - 0
en/scheduler_hook.c

@@ -47,7 +47,11 @@ static rt_thread_t tid2 = RT_NULL;
 
 static void hook_of_scheduler(struct rt_thread *from, struct rt_thread *to)
 {
+#if RT_VER_NUM >= 0x50001
+    rt_kprintf("from: %s -->  to: %s \n", from->parent.name, to->parent.name);
+#else
     rt_kprintf("from: %s -->  to: %s \n", from->name, to->name);
+#endif
 }
 
 int scheduler_hook(void)

+ 4 - 0
zh/scheduler_hook.c

@@ -40,7 +40,11 @@ static rt_thread_t tid2 = RT_NULL;
 
 static void hook_of_scheduler(struct rt_thread *from, struct rt_thread *to)
 {
+#if RT_VER_NUM >= 0x50001
+    rt_kprintf("from: %s -->  to: %s \n", from->parent.name, to->parent.name);
+#else
     rt_kprintf("from: %s -->  to: %s \n", from->name, to->name);
+#endif
 }
 
 int scheduler_hook(void)