openblt/Target/Demo/ARMCM4_STM32F4_Olimex_STM32.../Boot/lib/newlib/_exit.c

39 lines
826 B
C

// ----------------------------------------------------------------------------
#include <stdlib.h>
// ----------------------------------------------------------------------------
// Forward declaration
void
_exit(int code);
// ----------------------------------------------------------------------------
// We just enter an infinite loop, to be used as landmark when halting
// the debugger.
//
// It can be redefined in the application, if more functionality
// is required.
void
__attribute__((weak))
_exit(int code __attribute__((unused)))
{
// TODO: write on trace
while (1)
;
}
// ----------------------------------------------------------------------------
void
__attribute__((weak,noreturn))
abort(void)
{
_exit(1);
}
// ----------------------------------------------------------------------------