Merge branch "preempt" in "trunk".
[bertos.git] / bertos / cpu / power.h
index 93c40c0394936d09552074b905eb423e9b4113aa..d73eb621a785ef17629ff03e25748820983d476f 100644 (file)
@@ -67,7 +67,8 @@
 INLINE void cpu_relax(void)
 {
 #if CONFIG_KERN
-       proc_yield();
+       if (proc_preemptAllowed())
+               proc_yield();
 #endif
 
 #if CONFIG_WATCHDOG