site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On Jul 21, 2008, at 5:26 PM, Steve Checkoway wrote: On Jul 21, 2008, at 1:47 PM, Ethan Bold wrote: Until now, UpdateSystemActivity() was the only game in town, but please don't use it anymore! We've got a better alternative. IOPMAssertionCreateWithName() doesn't seem to exist anywhere (google knows nothing about it). IOPMAssertionCreate() doesn't seem to exist in pre-10.5 and since I see no need to restrict to 10.5, that doesn't work for me. * Prefer IOPMAssertionCreateWithName(), which lets you pass a string describing the purpose of the assertion (for debugging & diagnostic use for Apple & yourself) over the vanilla IOPMASsertionCreate. If you invoke IOPMAssertionCreate from multiple points in your code; naming the assertions differently will help identify leaks. As I said, IOPMAssertionCreateWithName() doesn't seem to exist. Xcode doesn't know about it, google doesn't know about it, I can't find it on my system: $ find /System/Library/Frameworks -name '*.h' -print0|xargs -0 grep IOPMAssertionCreateWithName prints nothing. Try IOPMAssertionCreate(); it's defined in the 10.4 and 10.5 SDK in IOKit.framework/Versions/A/Headers/pwr_mgt/IOPMLib.h. I think 10.4 was the first place it was published as non-private. This email sent to site_archiver@lists.apple.com