FreeBSD/sys/kern/kern_tc.c
/* Report the available timecounter hardware. */
Report the available timecounter hardware.
Report the available timecounter hardware .
static int
sysctl_kern_timecounter_choice(SYSCTL_HANDLER_ARGS)
{
	struct sbuf sb;
	struct timecounter *tc;
	int error;
	sbuf_new_for_sysctl(&sb, NULL, 0, req);
	for (tc = timecounters; tc != NULL; tc = tc->tc_next) {
		if (tc != timecounters)
			sbuf_putc(&sb, ' ');
		sbuf_printf(&sb, "%s(%d)", tc->tc_name, tc->tc_quality);
	}
	error = sbuf_finish(&sb);
	sbuf_delete(&sb);
	return (error);
}
static int sysctl_kern_timecounter_choice ( SYSCTL_HANDLER_ARGS ) { struct sbuf sb ; struct timecounter * tc ; int error ; sbuf_new_for_sysctl ( & sb , NULL , 0 , req ) ; for ( tc = timecounters ; tc != NULL ; tc = tc -> tc_next ) { if ( tc != timecounters ) sbuf_putc ( & sb , ' ' ) ; sbuf_printf ( & sb , " " , tc -> tc_name , tc -> tc_quality ) ; } error = sbuf_finish ( & sb ) ; sbuf_delete ( & sb ) ; return ( error ) ; }
Report the available timecounter hardware.
Report the available timecounter hardware .