Pumpkin, Inc.

Pumpkin User Forums

Determining aTask State.

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

Determining aTask State.

Postby gcarrelli » Tue Feb 05, 2008 9:18 am

I have a Task that 'waits' for 2 different events (BinSems) - waiting for 1 particular Event at a time by using OS_WaitBinSem () in several places in the Task. Is there a way to know which BinSem the Task is waiting? I need to be able to stop waiting for the Event is some cases due to an unrelated event causing a different Task to run.
gcarrelli
 
Posts: 10
Joined: Tue May 22, 2007 11:00 pm
Location: Cincinnati

Re: Determining aTask State.

Postby aek » Tue Feb 05, 2008 10:35 am

There is no API function to do that ... but as long as you are running with timeouts enabled (either in a Pro source-code build, or by using a -t library), then you can obtain the handle to the event the task is currently waiting on via (Salvo 4) using e.g. OScTcbP->u1.ecbP (I think -- haven't tested it).

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

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

Re: Determining aTask State.

Postby gcarrelli » Tue Feb 05, 2008 11:35 am

Any chance of making an that API service?
It would be very helpful to have a service that indicated what event a Task is currently 'waiting' for use by other Tasks.
Thanks.
gcarrelli
 
Posts: 10
Joined: Tue May 22, 2007 11:00 pm
Location: Cincinnati

Re: Determining aTask State.

Postby aek » Tue Feb 05, 2008 11:44 am

Yes, we'll put that on the list ...

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

-------
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 7 guests

cron