[uClinux-dev] [PATCH] : Avoid filename < TASK_SIZE test in do_getname() when no MMU

David Howells dhowells at redhat.com
Mon May 24 11:59:18 EDT 2010

Philippe De Muyter <phdm at macqel.be> wrote:

> > +#else
> > +#define TASK_SIZE	(0xFFFFFFFFUL)
> > +#endif
> Because of do_getname() :
> 	len = TASK_SIZE - (unsigned long) filename;
> we should rather have
> 	#define TASK_SIZE (0x100000000ull)

Do you guarantee that will work everywhere on a 32-bit system, though?

Note that it also makes things slower as gcc has to start using 64-bit
arithmetic where it could otherwise use 32-bit arithmetic.


More information about the uClinux-dev mailing list