Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

feat: basic process and thread#34

Merged
Azure-stars merged 6 commits intooscomp:mainfrom
AsakuraMizu:process
Apr 16, 2025
Merged

feat: basic process and thread#34
Azure-stars merged 6 commits intooscomp:mainfrom
AsakuraMizu:process

Conversation

@AsakuraMizu
Copy link
Copy Markdown
Collaborator

Blocked by oscomp/arceos#30

Description

This PR introduces basic process management and thread support via axprocess.

The "basic" I mentioned includes two aspects:

  • Syscalls related to sessions and process groups are not implemented in this PR, for example getsid and setpgid, but they are already implemented in axprocess so we can later add these functions easily. Not adding them to keep this PR's simplicity.
  • Threads heavily depend on signals. So all related functions that use signals may not work correctly, including exit_group and execve.

This PR also resolves #18 (comment).

Comment thread api/src/imp/task/clone.rs Outdated
Comment thread api/src/imp/task/clone.rs Outdated
Comment thread api/src/imp/task/clone.rs
Comment thread api/src/imp/task/clone.rs Outdated
Comment thread api/src/imp/task/clone.rs Outdated
.init_new(FD_TABLE.copy_inner());
}

if flags.contains(CloneFlags::CLONE_FS) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we separate these operations into some functions, such as operations corresponding to clone_fs and clone_thread flags?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure how to do this best. Ideally we could reuse most of the code for clone3, but it's also possible to just forward clone to clone3 after implementing clone3.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread api/src/imp/task/execve.rs Outdated
Comment thread api/src/imp/task/exit.rs Outdated
Comment thread api/src/imp/task/exit.rs
Comment thread api/src/imp/task/thread.rs Outdated
Comment thread src/mm.rs Outdated
@AsakuraMizu AsakuraMizu changed the title feat: basic process management and thread feat: basic process and thread Apr 16, 2025
Comment thread api/src/imp/task/clone.rs Outdated
Comment thread api/src/imp/task/thread.rs Outdated
Comment thread api/src/imp/task/clone.rs Outdated
@Azure-stars Azure-stars merged commit 0c84473 into oscomp:main Apr 16, 2025
25 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants