Re: stdcall in egcs

Andrea Arcangeli (andrea@e-mind.com)
Mon, 10 May 1999 02:06:24 +0200 (CEST)


On Sun, 9 May 1999, Mike Galbraith wrote:

>egcs-2.93.21 -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fno-omit-frame-pointer -g1 -pg -pipe -DCPU=586 -mcpu=pentium -march=pentium
> -c -o process.o process.c
> process.c:718: conflicting types for `__switch_to'
> /usr/src/linux/include/asm/system.h:15: previous declaration of `__switch_to'
> make[1]: *** [process.o] Error 1
>
>from 2.2.8-pre4+ikd/include/asm/system.h...

Ah, but 2.2.8-pre4 has some switch_to changes that will almost sure break
IKD.

So now the point is: does the same happen with 2.2.7 ?

>#ifndef CONFIG_KERNEL_DEBUGGING /* Fix the FASTCALL thing -arca */
>extern void FASTCALL(__switch_to(struct task_struct *prev, struct task_struct *next));
>#else
>extern void __switch_to(struct task_struct *prev, struct task_struct *next)
> __attribute__((stdcall));
>#endif

In 2.2.8 switch_to get the third parameter. The third parameter basically
is needed only to make sure to still have ebx pointing the "prev" task
before exiting the switch_to asm.

I have not yet tried but I am sure that to fix the asm of the IKD
switch_to we only need to change the numeration of some register (because
it changed their offset adding some additional variable in the
input/output section of the asm).

>[ ] Attribute usage changed?
>[ ] It has a bug?
>[ ] It hates me?
>[*] Nope, no ideas that don't generate instant reboot. :)

;))

Andrea Arcangeli

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