[ECOS] uITRON implementation

Fabrice Gautier Fabrice_Gautier@sdesigns.com
Thu Aug 3 11:56:00 GMT 2000


> -----Original Message-----
> From: Jonathan Larmour [ mailto:jlarmour@redhat.co.uk ]
> Subject: Re: [ECOS] uITRON implementation
> 
> It's an eCos "feature". I thought you maybe could get away 
> with changing
> CYGDAT_UITRON_TASK_EXTERNS to use extern char *'s, but I 
> don't think that would work.

About this Macro, there is:

extern "C" void task1( unsigned int ); \
extern "C" void task2( unsigned int ); \
extern "C" void task3( unsigned int ); \
extern "C" void task4( unsigned int ); \
static char stack1[ CYGNUM_UITRON_STACK_SIZE ], \
stack2[ CYGNUM_UITRON_STACK_SIZE ], \
stack3[ CYGNUM_UITRON_STACK_SIZE ], \
stack4[ CYGNUM_UITRON_STACK_SIZE ];

and in CYGDAT_UITRON_TASK_INITIALIZERS:

CYG_UIT_TASK( "t1", 1, task1, &stack1, CYGNUM_UITRON_STACK_SIZE ), \
CYG_UIT_TASK( "t2", 2, task2, &stack2, CYGNUM_UITRON_STACK_SIZE ), \
CYG_UIT_TASK( "t3", 3, task3, &stack3, CYGNUM_UITRON_STACK_SIZE ), \
CYG_UIT_TASK( "t4", 4, task4, &stack4, CYGNUM_UITRON_STACK_SIZE ),

Does the 4 task described here are all the task in the system or only the
task created at startup ?

The first case seems improbable because that would mean the task not yet
created should ne named task1() task2() ...

The second case seems improbable too because the staks fot the task not yet
created are not allocated.

Or should I read:
> extern "C" void task1( unsigned int ); \
> extern "C" void task2( unsigned int ); \
> extern "C" void task3( unsigned int ); \
> extern "C" void task4( unsigned int ); \
==> Task created initially
static char stack1[ CYGNUM_UITRON_STACK_SIZE ], \
stack2[ CYGNUM_UITRON_STACK_SIZE ], \
stack3[ CYGNUM_UITRON_STACK_SIZE ], \
stack4[ CYGNUM_UITRON_STACK_SIZE ];
==> Stack for all task in the system
(in the configuration default task created at start=total task in system so
...)

Thanks

A+
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 


More information about the Ecos-discuss mailing list