Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_ffclock.c
Show All 12 Lines | |||||
sbuf_cat(s, " "); | sbuf_cat(s, " "); | ||||
} | } | ||||
error = sbuf_finish(s); | error = sbuf_finish(s); | ||||
sbuf_delete(s); | sbuf_delete(s); | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_kern_sysclock, OID_AUTO, available, CTLTYPE_STRING | CTLFLAG_RD, | SYSCTL_PROC(_kern_sysclock, OID_AUTO, available, | ||||
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, | |||||
0, 0, sysctl_kern_sysclock_available, "A", | 0, 0, sysctl_kern_sysclock_available, "A", | ||||
"List of available system clocks"); | "List of available system clocks"); | ||||
/* | /* | ||||
* Return the name of the active system clock if read, or attempt to change | * Return the name of the active system clock if read, or attempt to change | ||||
* the active system clock to the user specified one if written to. The active | * the active system clock to the user specified one if written to. The active | ||||
* system clock is read when calling any of the [get]{bin,nano,micro}[up]time() | * system clock is read when calling any of the [get]{bin,nano,micro}[up]time() | ||||
* functions. | * functions. | ||||
Show All 23 Lines | |||||
sysclock_active = clk; | sysclock_active = clk; | ||||
error = 0; | error = 0; | ||||
break; | break; | ||||
} | } | ||||
done: | done: | ||||
return (error); | return (error); | ||||
} | } | ||||
SYSCTL_PROC(_kern_sysclock, OID_AUTO, active, CTLTYPE_STRING | CTLFLAG_RW, | SYSCTL_PROC(_kern_sysclock, OID_AUTO, active, | ||||
CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
0, 0, sysctl_kern_sysclock_active, "A", | 0, 0, sysctl_kern_sysclock_active, "A", | ||||
"Name of the active system clock which is currently serving time"); | "Name of the active system clock which is currently serving time"); | ||||
static int sysctl_kern_ffclock_ffcounter_bypass = 0; | static int sysctl_kern_ffclock_ffcounter_bypass = 0; | ||||
SYSCTL_INT(_kern_sysclock_ffclock, OID_AUTO, ffcounter_bypass, CTLFLAG_RW, | SYSCTL_INT(_kern_sysclock_ffclock, OID_AUTO, ffcounter_bypass, CTLFLAG_RW, | ||||
&sysctl_kern_ffclock_ffcounter_bypass, 0, | &sysctl_kern_ffclock_ffcounter_bypass, 0, | ||||
"Use reliable hardware timecounter as the feed-forward counter"); | "Use reliable hardware timecounter as the feed-forward counter"); | ||||
Show All 12 Lines |