On Monday 09 October 2006 9:37 am, Christopher "Monty" Montgomery wrote: > > I hand you a pointer to memory and ask you what type it is. You can't > tell me.
A C "struct foo *" points to a "foo". For a C "void *", the type info is out-of-band. Now, the notion of hardware "typed pointers" has been around since the 1950s, as I recall. General purpose computers don't implement them in hardware the way that e.g. LISP machines did, but they do sometimes use the low order bits of an address to encode type information ... just like EHCI hardware. C doesn't have hardware pointer typing. > You have to have the pointer *to the parent* to tell. It's > not a show-stopper; obviously the code as we have it works. It's just > a complication at every step, and it also means that you have to have > helper functions to even enforce typing loosely. You can't even walk > the tree via dereference; you have to call helper functions to do even > that. So? The out-of-band info has to be managed somehow, and that's a clean way to encapsulate it. You've not offered a better suggestion for how to encapulate it, I'll observe... and no matter what your suggestion is, it will _still_ boil down to managing out-of-band data. Because the "next" pointer from an ITD has still got to be able to point to an SITD -or- an ITD -or- a QH; ditto from an SITD. We know that a QH will only ever point to another QH though. :) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel