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>
17 lines
218 B
C
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);
|
|
}
|
|
}
|