1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include "nrf_802154_assert_zephyr.h"
9 
10 #if defined(CONFIG_NRF_802154_ASSERT_ZEPHYR_MINIMAL)
11 
nrf_802154_assert_handler(void)12 __weak void nrf_802154_assert_handler(void)
13 {
14 #ifdef CONFIG_USERSPACE
15 	/* User threads aren't allowed to induce kernel panics; generate
16 	 * an oops instead.
17 	 */
18 	if (k_is_user_context()) {
19 		k_oops();
20 	}
21 #endif
22 
23 	k_panic();
24 }
25 
26 #endif /* CONFIG_NRF_802154_ASSERT_ZEPHYR_MINIMAL */
27