We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 615824b commit af702e0Copy full SHA for af702e0
components/utilities/ulog/ulog.c
@@ -191,7 +191,7 @@ static void output_unlock(void)
191
return;
192
193
/* If the scheduler is started and in thread context */
194
- if (rt_thread_self() && (rt_interrupt_get_nest() == 0))
+ if (rt_interrupt_get_nest() == 0 && rt_thread_self() != RT_NULL)
195
{
196
rt_sem_release(&ulog.output_locker);
197
}
@@ -209,7 +209,7 @@ static void output_lock(void)
209
210
211
212
213
214
rt_sem_take(&ulog.output_locker, RT_WAITING_FOREVER);
215
0 commit comments