This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: thread_create stack base=NULL or size=0?

On 2009-04-15, Nick Garnett <> wrote:
>  Grant Edwards <> 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:
and search the list archive:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]