[comp.sys.amiga.tech] How to match handler tasks with devices?

doug@xdos.UUCP (Doug Merritt) (01/12/90)

I just wrote a new ps command ("yet another one? Why??" -- because I haven't
seen a really complete one yet).

It already knows which tasks are file system devices (via DevInfo).

I would like to figure out which tasks are instances of non-file system
devices, like "trackdisk.device", but haven't found any way to do so
(other than a kludge involving recognizing its name).

I tried looking at ExecBase->DeviceList, but didn't get far because I
can't figure out what it's a list of; anyone know? I know it's a struct List,
and I know that the elements start with struct Node, but I can't figure
out what structure follows the Node. Yes, I RTFM but couldn't find it
anywhere, nor were hex dumps enlightening.

That may be barking up the wrong tree anyway, so: what's a good way to
match up handler tasks/procs and the devices they handle??

Or: what documentation *should* I be reading? So far I've looked in
the RKM (Exec and Device volumes), all of the include files, and AmigaMail...
no luck.
	Thanks,
		Doug
-- 
Doug Merritt		{pyramid,apple}!xdos!doug
Member, Crusaders for a Better Tomorrow		Professional Wildeyed Visionary

rosenber@ra.abo.fi (Robin Rosenberg INF) (01/12/90)

!I tried looking at ExecBase->DeviceList, but didn't get far because I         
!can't figure out what it's a list of; anyone know? I know it's a struct List, 
!and I know that the elements start with struct Node, but I can't figure       
!out what structure follows the Node. Yes, I RTFM but couldn't find it         
!anywhere, nor were hex dumps enlightening.                                    

Its a list of struct Device's. Look at the ln_Type field and exec/nodes.h.
However I don't th

!That may be barking up the wrong tree anyway, so: what's a good way to
!match up handler tasks/procs and the devices they handle??            
                                                                      
I think so. I doubt a device has any idea of who's (ab)using it. Of course
it know who to reply to but you don't get that infornation from the device.

BTW! CodeProbe is nice when it comes to peeking at system structures. 
And poking if one's evil.

-------------------
Robin Rosenberg