Re: User-space to kernel communication
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jan 9, 2007, at 8:32 PM, Michael Smith wrote: typedef struct { unsigned char buffer[256]; unsigned char bufferSize; } MyIOUserClientArg; Again, thank you for all your help so far, I really appreciate it. - Greg _______________________________________________ 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... Also, as I asked in the other email, can you pass a pointer to a user-land allocated buffer as a parameter to a method call for the kernel to use? You can, although the kernel can't access it directly. As I pointed out previously, if the data is small (you mentioned 50 bytes, which is very small) you're better off just copying it. If you need to pass it to hardware, or to map it, you need to construct an IOMemoryDescriptor referencing it. By "just copying it" do you mean, as Brian pointed out, passing a structure of this sort: Or do you mean that the kernel has read-access to user-allocated memory (so that you could copy the data pointed to by a pointer). This email sent to site_archiver@lists.apple.com
participants (1)
-
Greg