系统启动后才能使用格式化输出

This commit is contained in:
大石头X2 2017-02-14 12:04:50 +08:00
parent 0ee1dae747
commit 1a87e709f4
1 changed files with 12 additions and 8 deletions

View File

@ -248,7 +248,10 @@ extern "C"
char cs[512]; char cs[512];
int tab = 0; int tab = 0;
// 先根据子任务打印缩进级别 // 先根据子任务打印缩进级别
if(Sys.Started)
{
int deepth = Task::Scheduler()->Deepth - 1; int deepth = Task::Scheduler()->Deepth - 1;
if(newline && deepth > 0 && (format[0] != '\0' || format[1] != '\0' || format[2] != '\0')) if(newline && deepth > 0 && (format[0] != '\0' || format[1] != '\0' || format[2] != '\0'))
{ {
@ -261,6 +264,7 @@ extern "C"
cs[tab++] = '\t'; cs[tab++] = '\t';
tab += snprintf(&cs[tab], sizeof(cs) - tab, "%d=>", Task::Current().ID); tab += snprintf(&cs[tab], sizeof(cs) - tab, "%d=>", Task::Current().ID);
} }
}
va_list ap; va_list ap;