4
1
mirror of https://github.com/DragonOS-Community/DragonOS.git synced 2025-06-20 10:06:31 +00:00

Merge branch 'master' into feat-network-rebuild

Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
longjin
2024-11-27 14:34:01 +00:00
153 changed files with 2578 additions and 1847 deletions
.github/workflows
Makefile
config
dadk-manifest.toml
docs
env.mk
kernel
tools
user
Makefile
dadk
config
about.dadkabout.tomlclear-0.1.0.dadkclear-0.1.0.tomlcore_utils-9.4.0.dadkcore_utils-9.4.0.tomldmesg-0.1.0.dadkdmesg-0.1.0.tomldog_0_1_0.dadkdog_0_1_0.tomldragon_reach-0.1.0.dadkdragon_reach-0.1.0.tomlheld-0.1.0.dadkheld-0.1.0.tomlhttp_server-0.1.0.dadkhttp_server-0.1.0.tomlmusl_1_2_4.dadkmusl_1_2_4.tomlnova_shell-0.1.0.dadknova_shell-0.1.0.tomlping_0_1_0.dadkping_0_1_0.tomlriscv_init-0.1.0.dadkriscv_init-0.1.0.tomltar_1_35.dadktar_1_35.tomltest_alarm_0_1_0.dadktest_alarm_0_1_0.tomltest_backlog_0_1_0.dadktest_backlog_0_1_0.tomltest_bind-0.1.0.dadktest_bind-0.1.0.tomltest_blockcache_0_1_0.dadktest_blockcache_0_1_0.tomltest_chown_0_1_0.dadktest_chown_0_1_0.tomltest_cred-0.1.0.dadktest_cred-0.1.0.tomltest_dup3_0_1_0.dadktest_dup3_0_1_0.tomltest_ebpf_0_1_0.dadktest_ebpf_0_1_0.tomltest_eventfd_0_1_0.dadktest_eventfd_0_1_0.tomltest_filemap-0.1.0.dadktest_filemap-0.1.0.tomltest_for_robustfutex_0_1_0.dadktest_for_robustfutex_0_1_0.tomltest_fstat-0.1.0.dadktest_fstat-0.1.0.tomltest_fstatfs_0_1_0.dadktest_fstatfs_0_1_0.tomltest_gettimeofday-0.1.0.dadktest_gettimeofday-0.1.0.tomltest_kvm_0_1_0.dadktest_kvm_0_1_0.tomltest_lo_0_1_0.dadktest_lo_0_1_0.tomltest_mkfifo-0.1.0.dadktest_mkfifo-0.1.0.tomltest_mount_1_0_0.dadktest_mount_1_0_0.tomltest_namespace.dadktest_namespace.tomltest_overlayfs.dadktest_overlayfs.tomltest_pty-0.1.0.dadktest_pty-0.1.0.tomltest_ramfs-0.1.0.dadktest_ramfs-0.1.0.tomltest_seqpacket_0_1_0.dadktest_seqpacket_0_1_0.tomltest_shm-0.1.0.dadktest_shm-0.1.0.tomltest_sigint-0.1.0.dadktest_sigint-0.1.0.tomltest_signal-0.1.0.dadktest_signal-0.1.0.tomltest_socket-0.1.0.dadktest_socket-0.1.0.tomltest_sqlite3-3.42.0.dadktest_sqlite3-3.42.0.tomltest_statfs_0_1_0.dadktest_statfs_0_1_0.tomltest_statx_0_1_0.dadktest_statx_0_1_0.tomltest_stream_socket_0_1_0.dadktest_stream_socket_0_1_0.tomltest_symlink_0_1_0.dadktest_symlink_0_1_0.tomltest_tokio-0.1.0.dadktest_tokio-0.1.0.tomltest_uart-0.1.0.dadktest_uart-0.1.0.tomltest_utimensat_0_1_0.dadktest_utimensat_0_1_0.tomluser_manage-0.1.0.dadkuser_manage-0.1.0.toml
port
sysconfig
home
reach

@ -74,6 +74,20 @@ impl Syscall {
return r;
}
/// 系统调用分发器,用于分发系统调用。
///
/// 与[handle]不同这个函数会捕获系统调用处理函数的panic返回错误码。
#[cfg(feature = "backtrace")]
pub fn catch_handle(
syscall_num: usize,
args: &[usize],
frame: &mut TrapFrame,
) -> Result<usize, SystemError> {
let res = unwinding::panic::catch_unwind(|| Self::handle(syscall_num, args, frame));
res.unwrap_or_else(|_| loop {
core::hint::spin_loop();
})
}
/// @brief 系统调用分发器,用于分发系统调用。
///
/// 这个函数内,需要根据系统调用号,调用对应的系统调用处理函数。