X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..a39ff7e25e19b3a8c3020042a3872ca9ec9659f1:/bsd/kern/kern_clock.c?ds=inline diff --git a/bsd/kern/kern_clock.c b/bsd/kern/kern_clock.c index f0e051345..08507cdc5 100644 --- a/bsd/kern/kern_clock.c +++ b/bsd/kern/kern_clock.c @@ -69,8 +69,6 @@ * HISTORY */ -#include - #include #include #include @@ -167,6 +165,8 @@ timeout_with_leeway( /* * Cancel a timeout. + * Deprecated because it's very inefficient. + * Switch to an allocated thread call instead. */ void untimeout( @@ -201,6 +201,8 @@ bsd_timeout( /* * Cancel a timeout. + * Deprecated because it's very inefficient. + * Switch to an allocated thread call instead. */ void bsd_untimeout( @@ -253,15 +255,14 @@ static int sysctl_clockrate (__unused struct sysctl_oid *oidp, __unused void *arg1, __unused int arg2, __unused struct sysctl_req *req) { - struct clockinfo clkinfo; + struct clockinfo clkinfo = { + .hz = hz, + .tick = tick, + .tickadj = 0, + .stathz = hz, + .profhz = hz, + }; - /* - * Construct clockinfo structure. - */ - clkinfo.hz = hz; - clkinfo.tick = tick; - clkinfo.profhz = hz; - clkinfo.stathz = hz; return sysctl_io_opaque(req, &clkinfo, sizeof(clkinfo), NULL); }