This aligns abort() and exit() definitions with other libc. Without 'noreturn' attribute, compilers have to assume that we will return from these functions which can lead to surprising errors like 'error: non-void function does not return a value'. Signed-off-by: Patryk Duda <patrykd@google.com>
16 lines
232 B
C
16 lines
232 B
C
/*
|
|
* Copyright (c) 2019 Linaro Limited
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <zephyr/kernel.h>
|
|
|
|
FUNC_NORETURN void _exit(int status)
|
|
{
|
|
printk("exit\n");
|
|
while (1) {
|
|
Z_SPIN_DELAY(100);
|
|
}
|
|
}
|