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

Jie Zhang jzhang918 at gmail.com
Wed Dec 21 16:17:57 UTC 2005


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,
Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libpthread-3.diff
Type: text/x-patch
Size: 727 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20051222/f95c2cc5/attachment.bin 


More information about the uClibc mailing list