DragonOS-Community / DragonOS

使用Rust从0自研内核,具有Linux兼容性的操作系统,面向云计算轻量化场景而设计。DragonOS is an operating system developed from scratch using Rust, with Linux compatibility. It is designed for lightweight cloud computing scenarios.
https://dragonos.org
GNU General Public License v2.0
817 stars 132 forks source link

feat(time): Add syscall support for utime* #838

Closed Godones closed 2 days ago

Godones commented 2 weeks ago

impl sys_utimensat impl sys_utimes add utimensat test fix some warning

fslongjin commented 2 weeks ago

r? @houmkh

hey,麻烦看看这个

Godones commented 1 week ago

因为这几个系统调用可以复用同一个底下的实现,但是SYS_FUTIMESAT以及SYS_UTIMES 在riscv架构下没有定义。

Chiichen commented 1 week ago

因为这几个系统调用可以复用同一个底下的实现,但是SYS_FUTIMESAT以及SYS_UTIMES 在riscv架构下没有定义。

那这种就应该写到arch/x86/syscall/mod.rs里面,参考SYS_ARCH_PRCTL

Chiichen commented 1 week ago

Associated issue: #834

Godones commented 1 week ago

可能是我的表述有问题,这两个系统调用不是架构相关的,应该属于你说的第二种情况。第二种情况是定义的系统调用是通用的系统调用,条件编译是因为目前只有X86下有实现,但是系统调用本身是架构无关的。我的理解是这里的条件编译是指这个系统调用只在x86平台下使用,其它平台没有这个系统调用。

Chiichen commented 1 week ago

可能是我的表述有问题,这两个系统调用不是架构相关的,应该属于你说的第二种情况。第二种情况是定义的系统调用是通用的系统调用,条件编译是因为目前只有X86下有实现,但是系统调用本身是架构无关的。我的理解是这里的条件编译是指这个系统调用只在x86平台下使用,其它平台没有这个系统调用。

那ok

Chiichen commented 1 week ago

@fslongjin LGTM,你看看新的改动