X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fpower.h;h=d73eb621a785ef17629ff03e25748820983d476f;hb=b78bdbe2e4aec232a7f48cb61a9b1d0dcee046b1;hp=b4550ad6d0b4ba64f8d5b05dfca8113d65799670;hpb=0eeba5822b3ff0e76ae0fd0272536d371d272d7d;p=bertos.git diff --git a/bertos/cpu/power.h b/bertos/cpu/power.h index b4550ad6..d73eb621 100644 --- a/bertos/cpu/power.h +++ b/bertos/cpu/power.h @@ -37,8 +37,8 @@ #ifndef CPU_POWER_H #define CPU_POWER_H -#include -#include +#include "cfg/cfg_proc.h" +#include "cfg/cfg_wdt.h" #if CONFIG_KERN #include @@ -67,7 +67,8 @@ INLINE void cpu_relax(void) { #if CONFIG_KERN - proc_yield(); + if (proc_preemptAllowed()) + proc_yield(); #endif #if CONFIG_WATCHDOG