Skip to content

refactor(smp): 将smp模块的系统调用适配syscall table#1367

Merged
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:refactor-smp-syscalll
Nov 12, 2025
Merged

refactor(smp): 将smp模块的系统调用适配syscall table#1367
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:refactor-smp-syscalll

Conversation

@fslongjin
Copy link
Member

No description provided.

Signed-off-by: longjin <longjin@DragonOS.org>
Copilot AI review requested due to automatic review settings November 12, 2025 12:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the SMP module's system call to adapt to the syscall table architecture. The main change is migrating the sched_getaffinity system call from the old monolithic syscall handler to a new modular syscall table structure.

  • Removed inline SYS_SCHED_GETAFFINITY handling from the main syscall dispatcher
  • Created a new dedicated syscall handler struct implementing the Syscall trait
  • Added proper bounds checking to prevent buffer overflow

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
kernel/src/syscall/mod.rs Removed inline SYS_SCHED_GETAFFINITY handling from the main syscall match statement
kernel/src/smp/syscall/sys_sched_getaffinity.rs Added new modular syscall handler implementing the Syscall trait with proper bounds checking
kernel/src/smp/syscall/mod.rs Added module declaration for the new syscall handler
kernel/src/smp/syscall.rs Removed old implementation that lacked bounds checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fslongjin fslongjin merged commit 40a3a3e into DragonOS-Community:master Nov 12, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants