This is the mail archive of the ecos-discuss@sourceware.org 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] |
Hi John, Fabian and all, > Fabian wrote: > ah, sorry - the first parameter is meant to be some kind of generic > scheduler information parameter not necessarily a static priority. I > should have taken a closer look into the documentation before my first > comment. Me too, I thought it to be priority. Thank you for light John! I am following your advice. Now, I added: typedef struct { cyg_tick_count deadline; cyg_tick_count wcet; cyg_tick_count period; } cyg_edf_sched_info; typedef cyg_edf_sched_info cyg_edf_sched_info_t; to cyg/kernel/ktypes.h Next, I built eCos library and linked my application to it. Run on my x86 Advantech target board and it works fine. Next, I defined additional member variable (to be used in Cyg_SchedThread_Implementation class Constructor, to extract [deadline, wcet and period] properties from *sched_info* generic parameter and use it for schedule() method) > cyg_edf_sched_info_t *thread_edf_info; to Cyg_SchedThread_Implementation class, where we can define scheduler specific members for threads (file src/sched/edf.hxx line #252). You can have a look at the same place with mlqueue.hxx. But, there is problem. When I include thread_edf_info to Cyg_SchedThread_Implementation class, I can build my eCos library, link it my eCos application and port it to board. But, when I run eCos application in target board, application halts after thread creation. However, I didn't modify any place of neither Cyg_SchedThread_Implementation class constructor nor cyg_thread_create() function yet. So, my question is, can I modify Cyg_SchedThread_Implementation class (just adding one more class member variable)? Herein I have attached my simple eCos application source file also. Note: in my target board application halts before printf("Threads are created\n"); line. Any help is highly appreciated! Thanks, Nodir. > I was envisaging something like this: > > ?struct cyg_edf_sched_info_t { > ? ?cyg_tick_count_t deadline; > ? ?cyg_tick_count_t wcet; > ? ?cyg_tick_count_t period; > ?}; > > ?cyg_edf_sched_info_t myinfo = {11, 12, 13}; > ?cyg_thread_create((cyg_addrword_t) &myinfo, simple_program, ... > > John Dallaway > eCos maintainer
Attachment:
edf_threads.c
Description: Binary data
-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |