This is the mail archive of the ecos-discuss@sources.redhat.com 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: Question about the parameter passed to cyg_thread_create() fun?


The convention is to specify sizes in bytes (as this is what the sizeof()
operator in C does, e.g. sizeof(cyg_uint32) is 4).

So stack should be declared as 'char stack[SIZE];' and 'SIZE' should be
passed to the cyg_thread_create() call.

For example, see:

http://sources.redhat.com/ecos/docs-latest/tutorials/i386pc/ecos-tutorial.13
.html#pgfId=1982019

Robert Cragie, Design Engineer

Direct: +44 (0) 114 281 4512
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
http://www.jennic.com  Tel: +44 (0) 114 281 2655
_______________________________________________________________

> -----Original Message-----
> From: ecos-discuss-owner@sources.redhat.com
> [mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Qiang Huang
> Sent: 18 November 2002 11:15
> To: Ecos-Discuss
> Subject: [ECOS] Question about the parameter passed to
> cyg_thread_create() fun?
>
>
> Hi all:
>   For the stack to be used for the thread which type should be used?
> e.g. if define cyg_uint32 stack[4096], then the size parameter should be
> 4096 or should be in byte count 4*4096  passed to cyg_thread_create()?
> if cyg_uint8 stack[4096] then 4096 should be passed as the size
> parameter to
> cyg_thread_create().
>
> Thanks a lot.
>
>
> --
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
>
>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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