Re: schedule() "spaghetti" in 2.3.2 ..

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Thu, 27 May 1999 17:38:03 +0200


On Tue, May 25, 1999 at 05:47:16PM +0100, Alan Cox wrote:
> > I've proposed to Linus a solution that IMVHO keep the code in schedule()
> > a little bit cleaner.
> > This is what I suggest :
> >
> > #define block_begin(f) begin_##f:
> > #define block_end(f) goto ret_##f
> > #define block_call(f) goto begin_##f; ret_##f:
>
> Why does replacing a goto with a macro that hides the fact its a goto
> make stuff cleaner. You would be better off working out how to add some
> kind of
>
> if __attribute((normally true)) ....
>
> to gcc

The syntax is already agreed upon, just the implementation is still missing
in egcs AFAIK.
E.g. glibc 2.1 is prepared for it already:

if (__builtin_expect (mode, normal) != normal)
{
}

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.3.3 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________

-
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/