Re: IOLockSleepDeadline example in docu is wrong (won't compile)
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com AbsoluteTime deadlineTime; memcpy(&deadlineTime, deadline, sizeof(deadline)); A Google for the following keywords will find you a bunch of examples: compile errors for AbsoluteTime -- Terry _______________________________________________ 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... On Sep 4, 2007, at 5:22 AM, Markus Hanauska wrote: I can't cast a number to a struct. Publishing source code that is supposed to not even compile is not only silly and confusing programmers, it's outreight useless. Seeing that the struct is endian safe, I assume I can do the following: correct? You can do that, or you can explicitly coerce the type at the call site (you can cast the address of a struct to a number pointer, and dereferernce it if you are calling the one function, or explicitly reference it if you're not. This is basically a wart from the passing of the address of the hi and lo values into a number of functions in user space case, which means we could not convert it to a 64 bit type without changing the symbol decoration used by C++, which would have introduced binary compatibility issues. This email sent to site_archiver@lists.apple.com
participants (1)
-
Terry Lambert