FreeBSD/sys/mips/rmi/fmn.c
/*
 * DEBUG support, XXX: static buffer, not locked 
 */
DEBUG support, XXX: static buffer, not locked
DEBUG support XXX : static buffer not locked
static int
sys_print_debug(SYSCTL_HANDLER_ARGS)
{
	struct sbuf sb;
	int error, i;
	sbuf_new_for_sysctl(&sb, NULL, 64, req);
	sbuf_printf(&sb, 
	    "\nID      INTR   ER   WU-SLP   WU-ERR     MSGS\n");
	for (i = 0; i < 32; i++) {
		if ((xlr_hw_thread_mask & (1 << i)) == 0)
			continue;
		sbuf_printf(&sb, "%2d: %8d %4d %8d %8d %8d\n", i,
		    msgring_nintr[i/4], msgring_badintr[i/4],
		    msgring_wakeup_sleep[i], msgring_wakeup_nosleep[i],
		    msgring_nmsgs[i]);
	} 
	error = sbuf_finish(&sb);
	sbuf_delete(&sb);
	return (error);
}
static int sys_print_debug ( SYSCTL_HANDLER_ARGS ) { struct sbuf sb ; int error , i ; sbuf_new_for_sysctl ( & sb , NULL , 64 , req ) ; sbuf_printf ( & sb , " \n \n " ) ; for ( i = 0 ; i < 32 ; i ++ ) { if ( ( xlr_hw_thread_mask & ( 1 << i ) ) == 0 ) continue ; sbuf_printf ( & sb , " \n " , i , msgring_nintr [ i / 4 ] , msgring_badintr [ i / 4 ] , msgring_wakeup_sleep [ i ] , msgring_wakeup_nosleep [ i ] , msgring_nmsgs [ i ] ) ; } error = sbuf_finish ( & sb ) ; sbuf_delete ( & sb ) ; return ( error ) ; }
DEBUG support, XXX: static buffer, not locked
DEBUG support XXX : static buffer not locked