Re: what's the replacement of page
Re: what's the replacement of page
- Subject: Re: what's the replacement of page
- From: Quinn <email@hidden>
- Date: Tue, 2 Mar 2004 16:08:12 +0000
At 4:30 -0800 2/3/04, Ramble Leon wrote:
struct page in linux is used very wide, most in I/O
operations,
such as file read/write from device, sometimes it's
also used in network communicatin. At the same time,
page is the basic memory unit while using virtual
memory. So could you please give me some suggest about
that? PS: I'm not working in the xnu, just add a kext,
so what I need is the struct can be used in kext.
Hmmm, I don't think there is any direct equivalent in Darwin. It
really depends on what type of KEXT you're implementing. If you're
working in the I/O Kit space, you need to look at IOMemoryDescriptor.
If you're working in the BSD or Mach space, you should look at UPLs
(Universal Page Lists).
It'd really be helpful if you could describe what you're trying to do
at a higher level.
Is there any facility in mach provide functions like
schedule_timeout(time), which means current thread
will giveup
processor and not be scheduled until time out? I think
thread_switch(...) can do this, but seems the thread
calling thread_switch(...) cannot be resumed before
the time is exhausted.
But it's very important for me to resume the thread at
sometime before the time is exhausted.
Again, this depends on what area of the kernel you're working in.
BSD, Mach, and I/O Kit all have support for stuff like this, and they
are all different. In general, you want to use the support from the
subsystem in which you're operating.
S+E
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.