Re: task_for_pid reference
Re: task_for_pid reference
- Subject: Re: task_for_pid reference
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Mon, 28 Mar 2011 13:05:45 +0100
On 27 Mar 2011, at 00:34, Rodrigo Vanegas wrote:
> I'm reading through source code to learn a bit about OS X kernel programming, and I've come across this bit of code [...]
The Mach API is supported, in the sense that DTS will help you use it and that it won't trip any App Store alarms, but it's not very well documented. We try to discourage folks from working with Mach directly because a) it lies very close to the kernel, so it's hard to use without tying yourself to kernel implementation details, b) some parts of it (specifically Mach messaging) are /extremely/ tricky to use correctly, and c) it's not covered by any standard, so, when things go wrong, it's hard to know who's at fault. In general we recommend that folks work at the BSD level (or higher) wherever possible.
The best reference documentation for the Mach API as it's implemented on our systems is the documentation that comes with the Darwin kernel source.
<http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/osfmk/man/index.html?txt>
Note: After clicking a link, click the [plain text] button at the top of the page to render the HTML. Or just download the kernel source and open the files with your web browser.
As far as conceptual docs, other folks have already recommended "Mac OS X Internals" by Singh, and I wholeheartedly agree with that recommendation.
<http://osxbook.com/>
It's a little out of date, but nowhere near as out of date as the other standard references, including:
o "Programming Under Mach" by Boykin et al, which has been out of print for a while
o the OSF docs hosted at CMU
<http://www.cs.cmu.edu/afs/cs.cmu.edu/project/mach/public/www/mach.html>
<http://www.cs.cmu.edu/afs/cs/project/mach/public/www/doc/osf.html>
Finally, I want to reiterate that, while it's fun to play with Mach, it's not the best starting point for most projects. The tricky thing is deciding when it's appropriate to drop down to the level, and I can only advise you on that question if I have more information about your high-level goal (assuming, that is, that you have one :-).
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
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