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

Replace the wait_queue data structure VecQueue with a linked list #184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guoweikang
Copy link


TODO: Replace branch with the official version number

pub fn blocked_resched(
&mut self,
mut wq_guard: WaitQueueGuard,
curr_waiter: Arc<WaitTaskNode>,
Copy link
Contributor

Choose a reason for hiding this comment

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

It still seems awkward, curr_waiter is just a wrapper for crate::current() in this code block.

Copy link
Author

Choose a reason for hiding this comment

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

Here need param waiter, because wq_guard have to push back the curr wrapper , we can't crteate the wrapper in blocked_resched, because waiter fast delete in caller, need use it; we can discuss whether there is a better way

Copy link
Author

Choose a reason for hiding this comment

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

6219d10 in this commit, give a plan remove wq_guard and waiter

@guoweikang guoweikang force-pushed the guoweikang/use_list branch 3 times, most recently from 6219d10 to 1f46842 Compare October 18, 2024 06:25
api/arceos_posix_api/build.rs Outdated Show resolved Hide resolved
modules/axtask/src/wait_queue.rs Outdated Show resolved Hide resolved
modules/axtask/src/wait_queue.rs Outdated Show resolved Hide resolved
modules/axtask/src/wait_queue.rs Outdated Show resolved Hide resolved
modules/axtask/src/wait_queue.rs Outdated Show resolved Hide resolved
--------
1 use Rawlist for wait queue
2 fix mutex size after wait_queue modify
3 add unit test for axsync/mutex size
Note: must use an unique &T as rawlist node

Signed-off-by: guoweikang <[email protected]>
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