I know mach_timebase_info has a return type of kern_return_t, but I'm not able to locate documenation that specifies the possible return values. Where can I find this information?
Asked
Active
Viewed 534 times
1 Answers
1
According to the latest source for xnu-2782.1.97 (OS X 10.10.1) available at http://www.opensource.apple.com/release/os-x-10101/, the only return value is KERN_SUCCESS:
/*
* mach_timebase_info_trap:
*
* User trap returns timebase constant.
*/
kern_return_t
mach_timebase_info_trap(
struct mach_timebase_info_trap_args *args)
{
mach_vm_address_t out_info_addr = args->info;
mach_timebase_info_data_t info;
clock_timebase_info(&info);
copyout((void *)&info, out_info_addr, sizeof (info));
return (KERN_SUCCESS);
}

Coder
- 441
- 2
- 17
-
-
For those coming here now, the files in question are `libsyscall/wrappers/mach_timebase_info.c` and `osfmk/kern/clock.c`, and the answer is still true on 10.12. – andlabs Dec 01 '16 at 02:59