Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is sysctl.proc_native documented? Other sysctl values?



The documentation is the documentation. Sorry if it doesn't work, please file a bug so that it can be address with corrected sample code.

The source code is in the xnu source code, where all other sysctls are implemented. <http://www.opensource.apple.com/darwinsource/tarballs/apsl/xnu-792.10.96.tar.gz>

Not all sysctls have header constants in <sys/sysctl.h>, but by design, since sysctlbyname(3) is string based and arbitrarily extensible, not all values are in that header.

The sysctl registration is in the source under xnu/bsd/kern/kern_sysctl.c:
SYSCTL_PROC(_sysctl, OID_AUTO, proc_native, CTLTYPE_NODE|CTLFLAG_RD, 0, 0, sysctl_sysctl_native ,"I","proc_native");

The implementation immediately precedes it.

You can look at the corresponding file for 10.4.7 for PowerPC to see how that would operate.

You should also consider the effects of people running the Universal version of Mac OS X Server 10.4.7 on PowerPC systems, since they will be running xnu-792.10.96, and people running normal Mac OS X 10.4.7 on PowerPC, since they will not.

Shantonu


On Sep 21, 2006, at 5:23 AM, Dan Smith wrote:

Eric Albert <email@hidden> writes:

Please don't do anything like this.  That's completely unsupported and could break.  There's a documented way to figure out if you're running translated, and that's the only way you should check it.


Where is this method documented? And, more to the point... my original question... where is the sysctl.proc_native variable, and the values it can assume, documented?

If you mean the sample code at

http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_exec_a/chapter_7_section_7.html

well, I don't think that code works. It probably doesn't work for trivial reasons, but... it doesn't work. And since I haven't found the documentation (or the header files or the source code) for that implement the sysctl.proc_native variable, I can only make plausible guesses about how to fix it.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Where is sysctl.proc_native documented? Other sysctl values? (From: Eric Albert <email@hidden>)
 >Re: Where is sysctl.proc_native documented? Other sysctl values? (From: "Dan Smith" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.