Writing Device Drivers

Potential Problems to Avoid

To run in a 64-bit environment, drivers may need to be converted to use the LP64 data model. There are several potential problem areas caused by the change in size of long and pointers:

  1. Source code that assumes that int, long, and pointer types are the same size are incorrect for 64-bit Solaris.

  2. Type casts may need updating, since the underlying data types may have changed.

  3. Data structures containing long types and pointers will need to be checked for different offset values than expected. This is caused by alignment differences that occur when long and pointer fields grow to 64 bits.