#include <mach/clock_priv.h> also included by
<mach/mach.h>mach/clock_priv.h
macro_clock_priv_user_
#define _clock_priv_user_
macroUSING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
functionmig_strncpy_zerofill
__attribute__((weak_import))
extern int mig_strncpy_zerofill(char * dest, const char * src, int len)▾
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu libsyscall/mach/mig_strncpy.c
Bounded string copy, a variant of mig_strncpy used by MIG-generated stubs. Copies the null-terminated string src into dest, a buffer of len bytes, guaranteeing null termination and truncating if necessary; unlike mig_strncpy, any bytes of dest remaining after the terminator are zero-filled. Returns the number of bytes copied including the trailing null, or 0 if len is nonpositive or dest is null. A null src yields a fully zeroed buffer and a return of 0. Declared weak_import in some headers so callers can test for its presence at run time.
macroclock_priv_MSG_COUNT
#define clock_priv_MSG_COUNT 2
functionclock_set_time
extern kern_return_t clock_set_time(clock_ctrl_t clock_ctrl, mach_timespec_t new_time)
Obsolete interfaces, removed from kernel.
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Set the current time.
The clock_set_time function sets the time kept by a clock. Setting the clock time will cause all pending clock alarms and sleeps to be terminated with timestamps set to the current clock time just prior to the new time being set with a return code of KERN_ABORTED.
Cautions. The use of this function is \*Vstrongly discouraged\*O since it could affect the monotonically increasing nature of the clock.
functionclock_set_attributes
extern kern_return_t clock_set_attributes( clock_ctrl_t clock_ctrl, clock_flavor_t flavor, clock_attr_t clock_attr, mach_msg_type_number_t clock_attrCnt )
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Set a particular clock's attributes.
The clock_set_attributes function sets attributes of a clock's operation.
Notes. The main reason a clock's current resolution would not always equal its minimum resolution is because the overhead of sustaining the minimum resolution, when it is not needed by any existing alarm service client, may be prohibitive for a given hardware platform and underlying clock device.
macrosubsystem_to_name_map_clock_priv
#define subsystem_to_name_map_clock_priv { "clock_set_time", 1200 },
{ "clock_set_attributes", 1201 }