Page 1 of 1

Determining aTask State.

PostPosted: Tue Feb 05, 2008 9:18 am
by gcarrelli
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.

Re: Determining aTask State.

PostPosted: Tue Feb 05, 2008 10:35 am
by aek
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).

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


Re: Determining aTask State.

PostPosted: Tue Feb 05, 2008 11:35 am
by gcarrelli
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.

Re: Determining aTask State.

PostPosted: Tue Feb 05, 2008 11:44 am
by aek
Yes, we'll put that on the list ...

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