Messages in this thread | | | Date | Tue, 16 Nov 2004 08:02:44 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: 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/
| |