[PATCH] Return EAGAIN if allocate stack error when creating thread

Mike Frysinger vapier at gentoo.org
Thu Dec 22 01:46:19 UTC 2005


On Thu, Dec 22, 2005 at 12:17:57AM +0800, Jie Zhang wrote:
> On 12/21/05, Mike Frysinger <vapier at gentoo.org> wrote:
> > On Wed, Dec 21, 2005 at 05:01:49PM +0800, Jie Zhang wrote:
> > >
> > > I think the loop was written for MMU case. When there is MMU, mmap ()
> > > is used to allocate the stack. If one segment is already mapped, we
> > > should continue to see if we can use the next one. However, for NOMMU,
> > > malloc () is used. It's waste of CPU cycles to continue to try if it
> > > fails. Here is a new patch, which makes this change only for NOMMU.
> >
> > ok, that makes sense ... best to include this comment in the patch then
> > so someone down the line doesnt scratch their head and wonder why it's
> > needed :)
> 
> OK. This is a new patch with the comment.

thanks, committed
-mike



More information about the uClibc mailing list