-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add cooperative task manager #82
Open
vicitori
wants to merge
53
commits into
IvanArkhipov1999:main
Choose a base branch
from
vicitori:sync/preemp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
9e3387e
Implement cooperative scheduler
vicitori b822163
Add template for context switcher
vicitori 73ee053
Remove excess type FunctionType
vicitori 3c873cb
Add task id
vicitori 396d59e
Remove context_switcher
vicitori f9d5fe1
Add put_to_sleep method
vicitori a14b93b
Add terminate_task method
vicitori 5a30dfb
Remove context_switchers from lib.rs
vicitori b5e5821
Add changes before merging
vicitori 924f126
Sync
vicitori 1f6777a
Change sched according to preemptive
vicitori 597d9fb
Implement TaskManagerTrait
vicitori cd97e60
Rename method to add_priority_task
vicitori 38e2abf
Rename task_core to core
vicitori e96e24f
Fix condition for priority in add_priority_task
vicitori 43f2da0
Add stop condition check in schedule()
vicitori 26542ea
Merge with preemptive
vicitori dfa2536
Fix fn call from CooperativeTM not TM
vicitori 7c66e2a
Fix errors and warnings
vicitori 3f5186d
Add comments and refactor code
vicitori c7d71d4
Add TODO errors handling comment
vicitori 73b24fb
Remove .idea
vicitori e8e9bd3
Add comments for statuses
vicitori 0d276b1
Add panic when errors
vicitori 9f18efa
Fix warnings
vicitori 916d452
Add test_start_task_manager for tests
vicitori fe0c827
Fix bugs according to test
vicitori c8b6db7
Test add_fn, find_fn
vicitori 48d640a
Remove Created state
vicitori f61e8ea
Add tests functions, current_task_id
vicitori 5caf5fe
Add simple test for put_to_sleep
vicitori 980d22b
Tests for get_id, replace reset to fn head
vicitori 5640ff9
Add panic get_id_from_position
vicitori 0debdfa
Test diff states for put_to_sleep
vicitori 956b568
Add wake_up and test it
vicitori 0b5db20
Refactor fn terminate task with current_task_id
vicitori 980376c
Fix schedule fn (sleeping state)
vicitori 2baecc9
Remove terminate_curr_task fn
vicitori 9c32884
Test terminate_task fn
vicitori 63a9061
Add rest of tests
vicitori e5bc524
Fix code according to tests
vicitori bf57940
Add timer_unit_tests to separate file
vicitori f231a08
Refactor tests, add more comments
vicitori 7790516
Add comments, refactor and change fn new
vicitori af6d517
Fix tests and bugs
vicitori b7390b9
Fix according to clippy
vicitori e37ceb5
Add examples for coop sched
vicitori 104ca6c
Merge with 'main'
vicitori 520b344
Fix linker scripts according to ci errors
vicitori 8c99ca9
Fix linker script for esp32c6
vicitori 899cb66
Fix wake up test
vicitori 9ce3a1c
Add ci to local repo
vicitori f013647
Fix ld/esp32c6.ld
vicitori File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we begin with empty tasks array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each vector is for tasks of a specific priority and all possible priorities are initialized at the start of the manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we create vector for exact priority, when task with such priority appears? Cause seems like we use unnecessary memory. It may be critical for devices with small memory such as esp32.