Skip to content

Commit cdb5ce8

Browse files
xmaowumysterywolf
authored andcommitted
解决 list_mutex 互斥量没有线程持有时打印错误
1 parent 713be7f commit cdb5ce8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/finsh/cmd.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ long list_mutex(void)
453453
maxlen, RT_NAME_MAX,
454454
m->parent.parent.name,
455455
RT_NAME_MAX,
456-
m->owner->parent.name,
456+
(m->owner == RT_NULL) ? "(null)" : m->owner->parent.name,
457457
m->hold,
458458
m->priority,
459459
rt_list_len(&m->parent.suspend_thread));
@@ -466,7 +466,7 @@ long list_mutex(void)
466466
maxlen, RT_NAME_MAX,
467467
m->parent.parent.name,
468468
RT_NAME_MAX,
469-
m->owner->parent.name,
469+
(m->owner == RT_NULL) ? "(null)" : m->owner->parent.name,
470470
m->hold,
471471
m->priority,
472472
rt_list_len(&m->parent.suspend_thread));

0 commit comments

Comments
 (0)