zephyr/lib/libc/minimal/source/stdlib/abort.c
Keith Packard bc2075e31b libc/minimal: Use CODE_UNREACHABLE in abort()
This allows this function to build without -ffreestanding for testing.

Signed-off-by: Keith Packard <keithp@keithp.com>

fixup
2023-04-25 06:18:26 -04:00

16 lines
209 B
C

/*
* Copyright (c) 2020 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdlib.h>
#include <zephyr/kernel.h>
void abort(void)
{
printk("abort()\n");
k_panic();
CODE_UNREACHABLE;
}