Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Statemate (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-Aug-2004 17:44
User is offline View Users Profile Print this message


智仁 θ…ι‡Ž

Posts: 33
Joined: 5-Aug-2004

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
Report this to a Moderator Report this to a Moderator
 5-Aug-2004 17:44
User is offline View Users Profile Print this message


Raz Yerushalmi

Posts: 19
Joined: 21-Jul-2004

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
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Statemate forum.
There are currently 1 users logged in.
The most users ever online was 12 on 4-Mar-2008 at 15:31.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.