Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce user-defined task extended data #173

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Introduce user-defined task extended data #173

merged 2 commits into from
Sep 17, 2024

Conversation

equation314
Copy link
Member

Major changes to axtask:

  1. Add a task_ext field to TaskInner, and allow users to define the specific structure via the def_task_ext! macro.
  2. Add a spawn_task API with TaskInner as the argument.

@@ -11,7 +12,7 @@ pub fn start_secondary_cpus(primary_cpu_id: usize) {
let mut logic_cpu_id = 0;
for i in 0..SMP {
if i != primary_cpu_id {
let stack_top = virt_to_phys(va!(unsafe {
let stack_top = virt_to_phys(VirtAddr::from(unsafe {
Copy link
Contributor

Choose a reason for hiding this comment

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

you just revert it back (dog head manually

Copy link
Contributor

Choose a reason for hiding this comment

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

🙃

Copy link
Member Author

Choose a reason for hiding this comment

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

I removed va and pa exports in axhal::mem, so we need to import the memory_addr dependency if use va!.

Do you think it is OK?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with the former

@equation314 equation314 merged commit 2721cfd into main Sep 17, 2024
26 checks passed
@equation314 equation314 deleted the task-ext branch September 25, 2024 03:52
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.

3 participants