Pumpkin, Inc.

Pumpkin User Forums

OSTimer() improvement

Have an idea on how to make Salvo better? Post it here!

OSTimer() improvement

Postby luben » Mon Jan 08, 2001 9:20 am

Hello,

OSTimer() /on page 252 of the manual/ must be called at periodical time. It makes 2 things - increments counters and check if some tasks's status should be changed from waiting/delayed to eligiable.

In fact is it makes one task eligiable it should wait until becomes the highest priority task and only then it will run.

So, OSTimer() makes 2 thinks:
- increments counters
- checks if some tasks status should be changed

What I think is that OSTimer() should make only incrementing of the counters. Other new function OSChkTimer() that is called before (or within) the OSSchedule() can check the new status of the counters and will react.

This will decrease the ISR latency and of course will reduce the OSTimer() call levels (even it could be implemented like macro).

Well, for all fasion users, that want to use old style OSTimer() or they don't have problems with ISR latency you can keep the current OSTimer() with other name, or for better compatibility the new functions should be OSIncTimer() and OSChkTimer().

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: OSTimer() improvement

Postby aek » Mon Jan 08, 2001 10:24 am

Do you have a secret camera at Pumpkin's Labs? :-)

This is precisely what was done to OSTimer() for the v2.2 release ... the "checking" part of OSTimer() is now inside of OSSched(), and the rest (just a couple of instructions) are left to OSTimer().

Also, the ISR part of OSTimer() can be in-lined, saving one stack depth, as can OSSched() in its entirety.All part of the upcoming v2.2 release ...

-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Re: OSTimer() improvement

Postby luben » Tue Jan 09, 2001 12:04 pm

Hello,

I see that you work hard and that your new Salvo will be much better then the first one. I'll be happy if I can help you to improve somehow the Salvo.

But I think that there are not so many things to be changed - Salvo is just one perfect system. Well, it needs good knowleges both in C and programming skills. It's not like frozen pizza - just to warm it and to eat it. It need some time for learning to understand the ideas and it needs some change of the style of programming, so it can fit to Salvo. From other side you'll receive something very powerful, increadible.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron