Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to stop a task in vxworks (simulator)

2,246 views
Skip to first unread message

Krishna Kumar

unread,
Sep 19, 2001, 1:33:24 AM9/19/01
to
Hi all,

I have a task which is running in a loop. My application will use
ports, allocated memory etc and also have a function which will
close all the ports, free the allocated memory.

My questions is.
How to stop this task gracefully?.(i.e task should exit after freeing
my application's resources. Where i have to call my Free
resources method).

I have tried the following cases but both are not successful for me.

1. td <taskid> - It closes the task obnormallly(i.e exits without
freeing the resources).

2. kill (<taskId, signo). Before that I have implemented signal in my
application using sigInit() and signal() method calls.

Can any one guide me?

Thanks
Krishna kumar.

Manuel van den Berg

unread,
Sep 19, 2001, 6:54:01 AM9/19/01
to
Hi,

There are IMHO two options:

1. Use a kill and install a signal handler to perform task cleanup.
2. Install a task delete hook (See taskHookLib) and let the hook
perform the cleanup.

Good luck,

Manuel


"Krishna Kumar" <gkri...@india.adventnet.com> wrote in message
news:cba86284.0109...@posting.google.com...

david lindauer

unread,
Sep 19, 2001, 10:10:24 AM9/19/01
to
another method we use for tasks that execute in a while loop, is to put a
boolean variable as the argument to the while loop. Then after the while
loop we put the task clean up stuff. To kill the task, set the boolean.

David

0 new messages