Only include switch.h when preemption is enabled
authorbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:44:16 +0000 (15:44 +0000)
committerbernie <bernie@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 18 Feb 2008 15:44:16 +0000 (15:44 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1134 38d2e660-2303-0410-9eaa-f027e97ec537

drv/timer.c

index 45ce64b44a892165bb5247c9d7b63c1b49fbdf58..0e756dbb6cb01c435062380cbd60536d0e165520 100644 (file)
@@ -74,7 +74,9 @@
 
 #if CONFIG_KERNEL
        #include <config_kern.h>
-       #include <hw/switch.h>
+       #if CONFIG_KERN_PREEMPTIVE
+               #include <hw/switch.h>
+       #endif
        #if CONFIG_KERN_SIGNALS
                #include <kern/signal.h> /* sig_wait(), sig_check() */
                #include <kern/proc.h>   /* proc_current() */