arch/xtensa/core/xtensa_intr.c
/*
 * This function registers a handler for the specified exception.
 * The function returns the address of the previous handler.
 * On error, it returns 0.
 */
This function registers a handler for the specified exception.
The function returns the address of the previous handler.
On error, it returns 0.
This function registers a handler for the specified exception . The function returns the address of the previous handler . On error it returns 0 .
xt_exc_handler _xt_set_exception_handler(int n, xt_exc_handler f)
{
	xt_exc_handler old;
	if (n < 0 || n >= XCHAL_EXCCAUSE_NUM)
		return 0;       
	old = _xt_exception_table[n];
	if (f) {
		_xt_exception_table[n] = f;
	} else {
		_xt_exception_table[n] = &xt_unhandled_exception;
	}
	return ((old == &xt_unhandled_exception) ? 0 : old);
}
xt_exc_handler _xt_set_exception_handler ( int n , xt_exc_handler f ) { xt_exc_handler old ; if ( n < 0 || n >= XCHAL_EXCCAUSE_NUM ) return 0 ; old = _xt_exception_table [ n ] ; if ( f ) { _xt_exception_table [ n ] = f ; } else { _xt_exception_table [ n ] = & xt_unhandled_exception ; } return ( ( old == & xt_unhandled_exception ) ? 0 : old ) ; }
This function registers a handler for the specified exception.
This function registers a handler for the specified exception .
/* invalid exception number */