zephyr/lib/libc/minimal/source/stdlib/exit.c
Alberto Escolar Piedras 8eff5b6c01 libC minimal: Fix for POSIX arch
The spin loop in _exit() needs a Z_SPIN_DELAY() for the
posix architecture, so it does not hang the whole
executable on that infinite loop but only the thread
that exit'ed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-06-22 17:16:17 -04:00

17 lines
218 B
C

/*
* Copyright (c) 2019 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <zephyr/kernel.h>
void _exit(int status)
{
printk("exit\n");
while (1) {
Z_SPIN_DELAY(100);
}
}