Page 1 of 1

STOP a Task waiting for an event

PostPosted: Fri Jun 30, 2006 4:21 am
by Darukur
Can be stopped a task waiting for an event?

Re: STOP a Task waiting for an event

PostPosted: Fri Jun 30, 2006 9:20 am
by aek
Not normally.

You need a special function to do so ...

Better to signal the task and when it wakes up, have it stop itself.

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


Re: STOP a Task waiting for an event

PostPosted: Mon Jul 03, 2006 4:30 am
by Darukur
Thanks again.

Re: STOP a Task waiting for an event

PostPosted: Wed Jul 05, 2006 6:11 am
by Darukur
If my task manages multiple events.
How can I signal the current event that is my task waiting from between another task?

------------------
the one that does not know what looks for does not understand what finds


Re: STOP a Task waiting for an event

PostPosted: Wed Jul 05, 2006 10:09 am
by aek
Assuming you mean that you have several calls to OS_WaitXyz() (with different events) in your task, then it's not so simple ...

You could switch over to event flags (exclusively), but see http://www.pumpkininc.com/ubb/Forum12/HTML/000014.html .

You could also use a global that the task checks after each OS_WaitXyz() call ... if that global is now set, then the stask should stop itself, etc.

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