This is the mail archive of the
mailing list for the eCos project.
Re: thread_create stack base=NULL or size=0?
On 2009-04-15, Nick Garnett <email@example.com> wrote:
> Grant Edwards <firstname.lastname@example.org> writes:
>> Can somebody explain the behavior of cyg_thread_create when the
>> stack-base is NULL or when a stack-size is 0?
> In the original design it was intended that there be an option
> to allow the kernel to malloc all data structures, including
> thread stacks (which may have had a default size, selected by
> zero). This is why the object structure is passed in as the
> last argument, and we return a "handle", which is just a copy
> of the structure address.
> Ultimately we decided not to do that and make the user supply
> all memory. However, the API features for this remained, and
> comments were left in the code.
Thanks. Now I don't feel so bad about not being able to figure
out how that feature was implemented in the C++ source code.
[Though I should know by now not to pay much attention to comments.]
Grant Edwards grante Yow! You can't hurt me!!
at I have an ASSUMABLE
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss