[ECOS] Add new class to the scheduler file

Nodir Kodirov nodir.qodirov@gmail.com
Tue Apr 20 09:30:00 GMT 2010


Hello eCos community!

I think regular members of the community already know that I am
working on EDF scheduler for eCos. I have some positive results far
now, but still they are far from being complete. This time I need to
add new class to my EDF scheduler source code. I faced application
compile & link problem on this, below is the description of what I
did.

My aim is to store "millisecond per system tick" as a static member of
some "general info class". Thus, I put this code:
> class Cyg_Sys_Gen_Info
> {
> public:
> 	static long ms_per_sys_tick;
> };
to packages/kernel/v3_0/include/edf.hxx

And this piece:
> Cyg_Sys_Gen_Info::Cyg_Sys_Gen_Info()
> {
>	CYG_REPORT_FUNCTION();
>	// some code here
>	CYG_REPORT_RETURN();
> }
to packages/kernel/v3_0/src/sched/edf.cxx. Next, I want to access it
as Cyg_Sys_Gen_Info::ms_per_sys_tick (from edf.cxx file). I am able to
successfully build eCos library, but at the time of application
compile & link it gives me an error:
> undefined reference to `Cyg_Sys_Gen_Info::ms_per_sys_tick'

So, now I was thinking, perhaps I should register my Cyg_Sys_Gen_Info
class in somewhere else as well. As I did register all of my scheduler
member variables in kapidata.h some time ago. Is there any evidence?

Thanks in advance,
Nodir.

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



More information about the Ecos-discuss mailing list