加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
shutdown.c 451 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2024 The TenonOS Authors
*/
#include <errno.h>
#include <uk/plat/bootstrap.h>
#include <uk/plat/common/cpu.h>
#include <uk/plat/common/irq.h>
static void cpu_halt(void) __noreturn;
void ukplat_terminate(enum ukplat_gstate request)
{
/* Try to make system off */
system_off(request);
cpu_halt();
}
static void cpu_halt(void)
{
__CPU_HALT();
}
int ukplat_suspend(void)
{
return -EBUSY;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化