rt-thread-official/bsp/gd32vf103v-eval/libraries/n22/stubs/_exit.c

18 lines
304 B
C
Raw Normal View History

2019-07-24 17:03:26 +08:00
/* See LICENSE of license details. */
#include <unistd.h>
#include "stub.h"
void _exit(int code)
{
const char message[] = "\nProgram has exited with code:";
write(STDERR_FILENO, message, sizeof(message) - 1);
// write_hex(STDERR_FILENO, code);
// write(STDERR_FILENO, "\n", 1);
for (;;);
}