Pumpkin, Inc.

Pumpkin User Forums

Timestamp delays waiting events ?

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

Timestamp delays waiting events ?

Postby Tim Jarrett » Mon Sep 26, 2005 3:41 am

Hi -

A feature I've found that I need more and more is the ability to have Salvo wait an event flag with a time-stamped delay, rather than just wait with a normal delay.

Is there any chance this could be incorporated ? The same thing would be useful while waiting messages and semaphores as well, so for example -

OS_WaitEFlagTS(), OS_WaitSemaphoreTS(), OS_WaitBinSemTS(), OS_WaitMsgTS() and OS_WaitMsgQTS() would all be available system calls.

------------------
Tell me again, how did I get this job ?

Tell me again, how did I get this job ?
Tim Jarrett
 
Posts: 2
Joined: Sun Sep 25, 2005 11:00 pm
Location: Portsmouth, UK

Re: Timestamp delays waiting events ?

Postby aek » Mon Sep 26, 2005 4:22 am

Hi Tim.

Hmmmm .... I have to think about that. Non-trivial.

Specifically, I need to see if there is room within the tcb struct to do TS delays when one is also waiting an event ... if not, tcbs would have to be expanded for just this purpose.

I'll get back to you on this.

------------------

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

Re: Timestamp delays waiting events ?

Postby Tim Jarrett » Tue Sep 27, 2005 11:30 am

aek -

Thanks, it would certainly make things easier in some of my applications. I assumed (from a quick look at the source) that the timestamp was calculated at the start of the delay and then treated the same as any other task delay. So to implement this (I thought) would only require adding some code to handle the initial timestamp calculation ?

By the way, I think there are some problems with the current timestamp code. In a repeating task loop, if you choose a time delay that is very large, i.e. (say) over 50% of the resolution of the OStypeDelay type, the delays don't seem to be correct, you get alternate long and short delays instead of steady fixed length delays. I think this is due to overflows occuring when calculating the timestamp delay value - the intermediate variables used are the same size as the source and destination variables. Normally to avoid this type of overflow you would ensure the intermediates are twice the size of the source and destination, i.e. source=word, intermediate result=long, destination=word instead of source, intermediate and destination=word. What do you think ?

quote:
Originally posted by aek:
Hi Tim.

Hmmmm .... I have to think about that. Non-trivial.

Specifically, I need to see if there is room within the tcb struct to do TS delays when one is also waiting an event ... if not, tcbs would have to be expanded for just this purpose.

I'll get back to you on this.


Tell me again, how did I get this job ?
Tim Jarrett
 
Posts: 2
Joined: Sun Sep 25, 2005 11:00 pm
Location: Portsmouth, UK


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron