Pumpkin, Inc.

Pumpkin User Forums

Watching timeouts

If you can't make Salvo do what you want it to do, post it here.

Watching timeouts

Postby luben » Wed Dec 27, 2000 8:40 am

Hello,

From what I learned the value of OSTimeout() is correct only in the current task and only before I return the control to the scheduler (via OS_Delay(), OS_WaitXYZ, OS_Prio(), OS_Yeild()), right? After I return the control to the scheduler the value is not valid.

My question is - can I control the timeouts value in one task from different task? What I can immagine right now is to add some semaphore or flag that is set when timeout occures. In fact the status of all tasks is residing somewhere in the memory and could be read from anywhere. I feel that it's not good manner to read and control the variables of Salvo directly, just asking is there some "shorter" way.

Regards
Luben

P.S. Unfortunetly I can't check this in my demo version.

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

Re: Watching timeouts

Postby aek » Thu Dec 28, 2000 8:11 am

Your understanding of OSTimedOut() is correct.

If I understand you correctly, you'd like to know exactly when the timeout occurs, as opposed to when the timed-out task actually runs. These are not the same, and could be quite different, if the timed-out task has a low priority and there are other, eligible tasks with higher priorities.

In v2.2 there is a function, OSRtnStateTask(), which will return OSTA_TIMEDOUT if the task is eligible and has timed out but has not yet run. But the problem is that a task will be flagged as timed out inside of OSSched().

Also, you cannot change the timeout period of a task that is waiting for an event.

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

Re: Watching timeouts

Postby luben » Fri Dec 29, 2000 7:39 am

Hello,

I don't have patience to see the new Salvo 2.2. By the way, when you intend to bring it "on air"?

It's good idea to be able to watch the status of the tasks. I'm sure that even in the current version it's possible, but not with predefined fuctions - the user have to check variables and flags and care about so many things.
Regards
Luben

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

Re: Watching timeouts

Postby aek » Fri Dec 29, 2000 8:22 am

v2.2 is scheduled for release in Q1 2001. We will probably put out a beta release before that, that will have most of the functionality planned for v2.2 ...
-------
aek
aek
 
Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm


Return to Coding

Who is online

Users browsing this forum: No registered users and 3 guests

cron