Memory Mapping examples/documentation?
Memory Mapping examples/documentation?
- Subject: Memory Mapping examples/documentation?
- From: Greg <email@hidden>
- Date: Mon, 3 Mar 2008 02:30:12 -0500
Hi, I'm searching for documentation or examples on how to transfer
data from a kernel extension written in C to a user-space program.
Currently I am using kernel controls to do this, but I would prefer to
do this using memory mapping as I feel it would be more efficient, and
I think would also simplify my code.
I've seen one example that uses IOConnectMapMemory in a user-space C
program to connect to an IOKit kernel extension written (obviously) in
C++. That kernel extension creates an IODataQueue and uses it as
shared memory.
Based on this I have two questions:
1) Can I convert my C kernel extension (of the Name_start/Name_stop
kind) directly to C++ (by simply changing its file-extension) so that
I can use the IODataQueue?
2) Since I'm guessing the answer to #1 is probably "no", then are
there any examples of how to do something like this in a C-based
kernel extension? Or any documentation? I do not want to make my
kernel extension an IOKit extension.
I'd like to put/copy data into this shared memory, and upon doing so
have the user-space program be notified of the new data so that it can
be immediately used/copied.
Many thanks for any assistance,
- Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden