[ulog][rtc][time][bug] solve the interference when enable the ulog timestamp (#5687)

* [ulog] 解决ulog开启时间戳后与libc time以及rtc驱动相关函数干涉的问题
* ulog:当发生递归输出时,后续递归想要输出的内容可能会因为防范递归的判断而无法输出
因此修改输出规则,在发生递归时,采用简单的,无格式的方式直接输出。这样既保证不会发生递归输出,也可以保证递归输出的部分可以正常输出。
* [ulog] size_t->rt_size_t NULL->RT_NULL
This commit is contained in:
Man, Jianting (Meco)
2022-03-21 14:06:17 +08:00
committed by GitHub
parent fba060e550
commit 8b58577230
7 changed files with 97 additions and 81 deletions
+2 -4
View File
@@ -113,16 +113,14 @@ static rt_err_t get_timeval(struct timeval *tv)
}
else
{
/* LOG_W will cause a recursive printing if ulog timestamp function is enabled */
rt_kprintf(_WARNING_NO_RTC);
LOG_W(_WARNING_NO_RTC);
return -RT_ENOSYS;
}
return rst;
#else
/* LOG_W will cause a recursive printing if ulog timestamp function is enabled */
rt_kprintf(_WARNING_NO_RTC);
LOG_W(_WARNING_NO_RTC);
return -RT_ENOSYS;
#endif /* RT_USING_RTC */
}