Pumpkin, Inc.

Pumpkin User Forums

STOP a Task waiting for an event

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

STOP a Task waiting for an event

Postby Darukur » Fri Jun 30, 2006 4:21 am

Can be stopped a task waiting for an event?
the one that does not know what looks for does not understand what finds
Darukur
 
Posts: 12
Joined: Sun Jun 25, 2006 11:00 pm
Location: Mar del Plata, Buenos Aires, Argentina

Re: STOP a Task waiting for an event

Postby aek » Fri Jun 30, 2006 9:20 am

Not normally.

You need a special function to do so ...

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

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

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

Re: STOP a Task waiting for an event

Postby Darukur » Mon Jul 03, 2006 4:30 am

Thanks again.
the one that does not know what looks for does not understand what finds
Darukur
 
Posts: 12
Joined: Sun Jun 25, 2006 11:00 pm
Location: Mar del Plata, Buenos Aires, Argentina

Re: STOP a Task waiting for an event

Postby Darukur » Wed Jul 05, 2006 6:11 am

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

the one that does not know what looks for does not understand what finds
Darukur
 
Posts: 12
Joined: Sun Jun 25, 2006 11:00 pm
Location: Mar del Plata, Buenos Aires, Argentina

Re: STOP a Task waiting for an event

Postby aek » Wed Jul 05, 2006 10:09 am

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.

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

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


Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 4 guests

cron