site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Hi Terry, On Thu, Jun 17, 2010 at 8:15 AM, Terry Lambert <tlambert@apple.com> wrote:
For example, if you needed to pass a pointer, you would declare the field as a uint64_t (unsigned long long), cat the pointer to a uintptr_t, and then
Or user_addr_t and CAST_USER_ADDR_T perhaps?
PS: This goes for things like ioctl(2) parameters, as well; if they are size variant, you will find yourself implementing separate 32 and 64 bit versions of the ioctl(2) command value in the kernel so that you can deal with both 32 and 64 bit clients; otherwise, the ioctl(2) case statement number will not match, and it will look like it's an unrecognized ioctl(2) when you call it from a binary of the "wrong" bitness.
Is that right? The command value appears to be 32 bit regardless of architecture. We use an ioctl in our code and don't use different command values and it appears to work. (We obviously take care of the parameters.) Or am I misunderstanding what you're saying? Kind regards, Chris _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Chris Suter