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: cyg_thread_create(), CYG_USER_START COMPLETION


Fernando Herrera wrote:
> 
> How can is posible that the processes, created inside module instances,
> which contain the functionality to execute, are able to go on execution?
> and Why they lost pointer values, has their context changed somehow?

The constructors caused the threads to start, but the data of module1 and
module2 would have been scrambled (although I also notice that a modulo1
typo).
 
> If this is true, I think would be interesting to avoid cyg_user_start()
> completion until the rest of the concurrent tasks of the system has
> finished. Is there some simple way to do this (for example, avoiding to
> have to launch some kind of sinchronization signal from every process
> of the system to unblock the cyg_user_start)?

No the tasks don't _start_ until cyg_user_start has finished.
cyg_user_start is before the scheduler starts, in order for you to set up
threads for when it does start. You can't expect objects on the stack to
persist - make them static instead.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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