Amit Mitkar wrote:
hi, I have a 64 bit driver with an ioctl entry point that can be called from 32 bit apps. From the various docs available it seems that I need to use the _MULTI_DATA_MODEL macro in my code to copy the ioctl arg appropriately depending upon what kind of app calls it.
  The ioctls to the driver can be called only from a library that we provide 
and the size of the ioctl argument is same for both 32 and 64 bit  
applications. Moreover, my code  runs perfectly without the macro.

So is it absolutely essential to use this in code that is supposed to handle 
both 32 bit and 64 bit apps ?



No.

Take a look at fd.c (floppy disk driver) in usr/src/uts/common/io.

Some of the ioctls use  _MULTI_DATAMODEL (DKIOCSVTOC, say),
some do not (FDDEFGEOCHAR, for example).

If your code is the same for 32 bit and 64 bit kernels and
32 bit and 64 bit apps, you don't need this.

- Bart

--
Bart Smaalders                  Solaris Kernel Performance
[EMAIL PROTECTED]               http://blogs.sun.com/barts
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to