FreeBSD/sys/ddb/db_sym.c
/*
 * Read-only variable reporting the current CPU, which is what we use when
 * db_cpu is set to -1.
 */
Read-only variable reporting the current CPU, which is what we use when
db_cpu is set to -1.
Read - only variable reporting the current CPU which is what we use when db_cpu is set to - 1 .
int
db_var_curcpu(struct db_variable *vp, db_expr_t *valuep, int op)
{
	switch (op) {
	case DB_VAR_GET:
		*valuep = curcpu;
		return (1);
	case DB_VAR_SET:
		db_printf("Read-only variable.\n");
		return (0);
	default:
		db_printf("db_var_curcpu: unknown operation\n");
		return (0);
	}
}
int db_var_curcpu ( struct db_variable * vp , db_expr_t * valuep , int op ) { switch ( op ) { case DB_VAR_GET : * valuep = curcpu ; return ( 1 ) ; case DB_VAR_SET : db_printf ( " \n " ) ; return ( 0 ) ; default : db_printf ( " \n " ) ; return ( 0 ) ; } }
Read-only variable reporting the current CPU, which is what we use when
 db_cpu is set to -1.
Read - only variable reporting the current CPU which is what we use when db_cpu is set to - 1 .