1 /* Copyright 2018 SiFive, Inc */
2 /* SPDX-License-Identifier: Apache-2.0 */
4 #include <metal/machine.h>
5 #include <metal/shutdown.h>
7 extern inline void __metal_shutdown_exit(const struct __metal_shutdown *sd, int code);
9 #if defined(__METAL_DT_SHUTDOWN_HANDLE)
10 void metal_shutdown(int code)
12 __metal_shutdown_exit(__METAL_DT_SHUTDOWN_HANDLE, code);
15 # warning "There is no defined shutdown mechanism, metal_shutdown() will spin."
16 void metal_shutdown(int code)
19 __asm__ volatile ("nop");