antognini@us.ibm.com said:
Whilst I understand the “should,” people, including me, are so used to
ULONGs, pointers and the like being so conveniently the same size, and
having been so since day 1 of a flat virtual-memory space, that the
reality is there’s a whole lot of relearning and rethinking to be
done.
I know I’ve beat a few people over the head with this (being a long
time alpha owner:-) but the only thing that can hold a pointer is another
pointer. Period.(1) That is what (void*) is for. If you only store pointers
in pointers, then soooo many stupid portability issues simply disappear.
Device driver writers have an additional constraint that sometimes
pointers have to go into registers of limited size. In truth, though,
that doesn’t happen much because you shouldn’t be shoving pointers
into hardware registers but the Thing-of-unspecified-type-that-comes-
out-of-virt_to_bus()-or-HalAllocateCommonBuffer().
I don’t think I have anywhere in any of my drivers a cast from pointer
to any integral type. I’m ready for 128 bit pointers:-)
(1) Actually, there is one integral to pointer cast that is allowed:
The integral value 0 may be assigned to or compared with any pointer,
and is the same as NULL.
Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com