Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: IOUserClient kIOUCStructIStructO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOUserClient kIOUCStructIStructO



Jürgen --

This looks like the parameter from userpace is copied into the kernal space memory allocation inStruct (not mapped) and if I do modifications to that memory they will not be seen in the Userspace. So I have to copy the *outStruct = *inStruct and do modifcations to the outStruct.

It does copy. If you want to map, you have to pass a pointer in the structure and wrap it with an IOMemoryDescriptor (using IOMemoryDescriptor::withAddress, and passing the task_t passed to your initWithTask() method).

But who allocates the outStruct?

The kernel.

How is the mechanism working?

Mach messaging.

-- Chris

------------------
6 Infinite Loop
M/S 306-2MS
Cupertino CA 95014
phone: (408) 974-4033
fax:   (408) 862-7577
email: email@hidden




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >IOUserClient kIOUCStructIStructO (From: devmaillists <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.