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

[refactor] add set_cpumask apis, seperate CurrentRunQueueRef, add put_task_with_state #183

Merged
merged 18 commits into from
Oct 17, 2024

Conversation

hky1999
Copy link
Contributor

@hky1999 hky1999 commented Oct 13, 2024

No description provided.

modules/axtask/src/task.rs Show resolved Hide resolved
modules/axtask/src/api.rs Outdated Show resolved Hide resolved
modules/axtask/src/api.rs Show resolved Hide resolved
modules/axtask/src/api.rs Outdated Show resolved Hide resolved
api/arceos_api/src/imp/task.rs Outdated Show resolved Hide resolved
modules/axtask/src/wait_queue.rs Show resolved Hide resolved
modules/axtask/src/run_queue.rs Show resolved Hide resolved
modules/axtask/src/run_queue.rs Outdated Show resolved Hide resolved
api/arceos_api/src/imp/task.rs Outdated Show resolved Hide resolved
api/arceos_api/src/imp/task.rs Outdated Show resolved Hide resolved
modules/axtask/src/run_queue.rs Show resolved Hide resolved
if !prev.is_idle() {
self.scheduler.lock().put_prev_task(prev.clone(), preempt);
}
/// Common reschedule subroutine,
Copy link
Member

Choose a reason for hiding this comment

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

Is the comment wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe, it's not common routine now, ( I renamed it as subroutine if you noticed

@@ -53,11 +53,11 @@ const ARRAY_REPEAT_VALUE: MaybeUninit<&'static mut AxRunQueue> = MaybeUninit::un
///
/// ## Returns
///
/// A static reference to the current run queue.
/// [`CurRunQueueRef`]: a static reference to the current `AxRunQueue`.
Copy link
Member

Choose a reason for hiding this comment

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

It is conflicted with existing hyperlink syntax of rustdoc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, I've fixed them as CurRunQueueRef

/// Note:
/// `CurRunQueueRef` is used to get a reference to the run queue on current CPU,
/// in which scheduling operations can be performed.
pub(crate) struct CurRunQueueRef<'a, G: BaseGuard> {
Copy link
Member

Choose a reason for hiding this comment

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

Use full name: CurrentRunQueueRef

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@hky1999 hky1999 changed the title [feat] add cpumask and set_cpumask apis [refactor] add set_cpumask apis, seperate CurrentRunQueueRef, add put_task_with_state Oct 17, 2024
@equation314 equation314 merged commit 7251ab8 into main Oct 17, 2024
26 checks passed
@equation314 equation314 deleted the set_cpumask branch October 17, 2024 23:36
buhenxihuan pushed a commit to buhenxihuan/arceos that referenced this pull request Nov 13, 2024
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