#include <kern/kfile.h>
#if CONFIG_KERNEL
-#include <kern/proc.h>
+ #include <kern/proc.h>
+#else
+ #define proc_yield() do {} while(0)
#endif
#include <string.h>
* is high.
*/
while (!(dataflash_stat(fd) & BUSY_BIT))
- {
- #if CONFIG_KERNEL
- proc_switch();
- #endif
- }
+ proc_yield();
stat = dataflash_stat(fd);