[comp.sys.amiga.programmer] Tasks

s902151@minyos.xx.rmit.oz.au (James Boyle [VIGILANTE]) (06/18/91)

I am writing a monitor/debug package in C and have come across two problems.

1. I have a procedure that outputs the status of all tasks, running, waiting
   and ready. I have tried both Disable or Forbid before I actually
   read the task pointers (thats all I store) and then re-enable the multi
   tasking afterwards. But if say I have a disk access while I excecute this
   procedure I get a Guru. I know that Disable disables interrupts as well
   as task switching but surely Forbid should work right???

2. Also is there any way to obtain the current program counter of a task.
   I cant find a field in the task structure. And I have tried looking on the
   task stack but cant find it.

Any help on either of these problems would be appreciated. 
Please post replies to the net as Im sure others would be interested.

|----------------------------------------------------------------|
| James Boyle  [Vigilante]     |  If debugging is the process of | 
|                              |  removing bugs, then programming|
| s902151@minyos.xx.rmit.oz.au |  must be the process of putting |
| vig@guru.pub.uu.oz.au        |  them in.                       |
-------------------------------|---------------------------------|