C (145/304)

From:meyersrl
Date:15 Aug 2000 at 21:50:55
Subject:Re: RemTask() within own task code.

I think Ive got it working ok.

I do this:

In the main program

struct Task *Subtask = CreateTask(etc, etc...);

Then in the Task Code

DeleteTask(SubTask);

There is no problems, well some but I dont think its to do with the task.

If you are using CreateTask() then you don't really need to call DeleteTask
(). Exec's fall back task removal
routine will call RemTask() by default at program return, and DeleteTask()
itself simply calls RemTask() anyway (according to the Libraries and
Devices RKM).

So you can:
1. Call RemTask(0L); directly from the subtask, or
2. Call DeleteTask(subtask); which will then call RemTask(), or
3. If you used CreateTask(), you could simply rely on Exec's task removal
routine at program return.

</pedantic _mode> ;)

Bob Meyers