[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] O(1) scheduler, 2.4.17-A1, 2.5.2-pre7-A1.


On Fri, 4 Jan 2002, Dieter N$B|t(Bzel wrote:

> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=k6    -DEXPORT_SYMTAB -c filemap.c
> In file included from filemap.c:26:
> /usr/src/linux/include/linux/compiler.h:13: warning: likely' redefined
> /usr/src/linux/include/linux/sched.h:445: warning: this is the location of
> the previous definition
> /usr/src/linux/include/linux/compiler.h:14: warning: unlikely' redefined
> /usr/src/linux/include/linux/sched.h:444: warning: this is the location of
> the previous definition
>...

This warning is harmless but I'm wondering why sched.h adds a second
definition of likely/unlikely instead of using the one in compiler.h?

I'd suggest the following patch against 2.4.17-A2:

--- include/linux/sched.h.old	Sat Jan  5 18:03:41 2002
+++ include/linux/sched.h	Sat Jan  5 18:10:16 2002
@@ -7,6 +7,7 @@

 #include <linux/config.h>
 #include <linux/binfmts.h>
+#include <linux/compiler.h>
 #include <linux/threads.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
@@ -441,8 +442,6 @@
  */
 #define _STK_LIM	(8*1024*1024)

-#define unlikely(x) x
-#define likely(x) x
 /*
  * The lower the priority of a process, the more likely it is
  * to run. Priority of a process goes from 0 to 63.

> -Dieter

cu
Adrian


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


$B$3$N>pJs$,$"$J$?$NC5$7$F$$$?$b$N$+$I$&$+A*Br$7$F$/$@$5$$!#(B
yes/$B$^$5$K$3$l$@!*(B   no/$B0c$&$J$!(B   part/$B0lIt8+$D$+$C$?(B   try/$B$3$l$G;n$7$F$_$k(B

$B$"$J$?$,C5$7$F$$$?>pJs$O$I$N$h$&$J$3$H$+!"$4<+M3$K5-F~2<$5$$!#FC$K!V$^$5$K$3$l$@!*!W$H8@$&>l9g$O5-F~$r$*4j$$$7$^$9!#(B
$BNc(B:$B!VJ#?t$N%^%7%s$+$i(BCATV$B7PM3$G(Bipmasquerade$B$rMxMQ$7$F(BWeb$B$r;2>H$7$?$$>l9g$N@_Dj$K$D$$$F!W(B