![]() |
Telelogic Statemate (steve huntington) | ![]() |
Topic Title: timer_tick in RiMC usercode.c (MAINLOOP_SC_EXT) Topic Summary: Created On: 5-Aug-2004 17:44 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello all,
The "timer_tick" flag is used in usercode.c of MAINLOOP_SC_EXT OSI. What is this flag for and is it OK to remove it? It is used as below: void one_ms_count(void) { ms_counter++; timer_tick = 1; ... void main(void) { ... while(1) { if(timer_tick){ timer_tick = 0; ... if(ms_counter%8 == 4){ /* User 8_Milisec Tasks Begin */\ /* User 8_Milisec Tasks End */ I guess it is used so that "if (ms_counter%8..." statementis executed only in each one ms. Without it, the same part could be executed more frequently and this results in worse performance (in more or less.) So I guess it is OK to remove if the possible performance loss is acceptable. The reason is to make I/F between user-defined scheduler and RiMC logic as simple as possible. Thanks |
|
![]() |
|
![]() |
|
Hello
Your description of the "timer_tick" flag is accurate. Of course it can be removed in favor of their scheduler. Please notice all the code in "usercode.c" is open to be changed in favor of integrating with the user environment. regards |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.