Coder
Coder

Reputation: 451

What are the possible return values for mach_timebase_info?

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?

Upvotes: 2

Views: 596

Answers (1)

Coder
Coder

Reputation: 451

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);
}

Upvotes: 1

Related Questions