preempt: Implement scheduling priorities
[bertos.git] / bertos / drv / flash25.c
index 949ec4014e4ef9f6ee1438d0cf9531d35a6f2177..793fab019dc546c3c298f6d44b0dc5dd4a8d7fee 100644 (file)
  * the GNU General Public License.
  *
  * Copyright 2007 Develer S.r.l. (http://www.develer.com/)
- *
  * -->
  *
- *  \brief Function library for serial Flash memory.
+ * \brief Function library for serial Flash memory.
  *
  * Module provide a kfile interface, that ensure an abstraction
  * from comunication channel and give a standard interface.
@@ -55,9 +54,7 @@
 
 #include <kern/kfile.h>
 
-#if CONFIG_KERNEL
-#include <kern/proc.h>
-#endif
+#include <cpu/relax.h> /* cpu_relax() */
 
 #warning FIXME:This file was change, but is untest!
 
@@ -79,10 +76,8 @@ static void flash25_waitReady(Flash25 *fd)
 
                if (!(stat & RDY_BIT))
                        break;
-               #if CONFIG_KERNEL
-               else
-                       proc_switch();
-               #endif
+
+               cpu_relax();
        }
 }