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: Replace eCos idle thread


> > As i see it, i have two choises. The first is to make a function call
> > from the default idle thread to the application provided idle thread
> > function. If i do this then i dont have to startup my own idle thread.
> > The second alternative is to replace the creation of the default idle
> > thread and instead let eCos start the idle thread but with my idle
> > function as an argument....but i dont think that this is possible.

Im not a C++ expert so this may not be possible....

You could make the eCos idle_thread_main function a weak function
using CYGBLD_ATTRIB_WEAK. You can then put your own implementation
into your application. The linker will then use yours and not eCos's
and will not complain about multiple definitions. 

I've done this with plain C functions in eCos, but i've not tried it
with C++ code. 

     Andrew

-- 
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]