lkml.org 
[lkml]   [2004]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fork pagesize patch


On Tue, 16 Nov 2004, David Howells wrote:
>
> You seem to have turned:

No, Andrew probably did.

>
> +#if THREAD_SIZE >= PAGE_SIZE
> max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
> +#else
> + max_threads = mempages / 8;
> +#endif
> +
>
> Into:
>
> if (THREAD_SIZE >= PAGE_SIZE)
> max_threads = mempages / (THREAD_SIZE/PAGE_SIZE) / 8;
> else
> max_threads = mempages / 8;
>
> Please don't do that. What you've done causes a divide-by-zero error to be
> emitted by the compiler if PAGE_SIZE > THREAD_SIZE. That's why I used the
> preprocessor in the first place.

What kind of broken compiler are _you_ using? Fix your compiler.

If THREAD_SIZE is smaller than PAGE_SIZE, then the compiler IS NOT ALLOWED
to do the divide-by-zero. Your compiler is so incredibly broken that this
is not even worth fixing. Complain to the gcc guys.

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.038 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site