mtd/include/linux/mtd compatmac.h,1.53,1.54
David Woodhouse
dwmw2 at infradead.org
Fri May 16 23:34:31 EDT 2003
Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv18894
Modified Files:
compatmac.h
Log Message:
fix cond_resched
Index: compatmac.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/compatmac.h,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- compatmac.h 17 May 2003 00:24:24 -0000 1.53
+++ compatmac.h 17 May 2003 03:34:28 -0000 1.54
@@ -499,7 +499,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3)
#define need_resched() (current->need_resched)
-#define cond_resched() do { if need_resched() schedule(); } while(0)
+#define cond_resched() do { int oldstate; if need_resched() { oldstate = current->state ; set_current_state(TASK_RUNNING); schedule(); set_current_state(oldstate); } } while(0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
More information about the linux-mtd-cvs
mailing list