X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fbenchmark%2Fcontext_switch.c;h=12298892a9c9bfebd15724ded8674b52d65e149f;hb=7a613efa9f80222fa9642bfb6a249972c7ae6c6e;hp=5ab77159d472cdc1b68db352e696c579d1d6314c;hpb=e195f7358f727bcf1f553cb00b1085d6ac3cb6ee;p=bertos.git diff --git a/bertos/benchmark/context_switch.c b/bertos/benchmark/context_switch.c index 5ab77159..12298892 100644 --- a/bertos/benchmark/context_switch.c +++ b/bertos/benchmark/context_switch.c @@ -47,7 +47,10 @@ #include #include +#if CONFIG_USE_HP_TIMER #include +static Serial out; +#endif #include @@ -57,8 +60,6 @@ static PROC_DEFINE_STACK(hp_stack, PROC_STACK_SIZE); static PROC_DEFINE_STACK(lp_stack, PROC_STACK_SIZE); static Process *hp_proc, *lp_proc, *main_proc; -static Serial out; - #if CONFIG_USE_HP_TIMER static hptime_t start, end; #endif @@ -101,8 +102,10 @@ void NORETURN context_switch(void) timer_init(); proc_init(); - ser_init(&out, CONFIG_CTX_DEBUG_PORT); - ser_setbaudrate(&out, CONFIG_CTX_DEBUG_BAUDRATE); + #if CONFIG_USE_HP_TIMER + ser_init(&out, CONFIG_CTX_DEBUG_PORT); + ser_setbaudrate(&out, CONFIG_CTX_DEBUG_BAUDRATE); + #endif #if CONFIG_USE_LED LED_INIT();