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

Add cooperative multitasking support #15

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

Conversation

thomasarmel
Copy link
Contributor

@thomasarmel thomasarmel commented Jan 2, 2023

Add support for cooperative multitasking

WARNINGS:

  • Each task will have a stack size of 4096 bytes, there is no check if a task overflows this limit
  • The maximum number of tasks is set to 10

->If you don't need multitasking, you can disable it (don't forget to remove TASKING = Tasking::init(); in lib.rs)

FURTHER IMPROVEMENTS:

  • Automatically switch tasks at clock interrupt (we will need to disable interrupts for sensitive operations like task creation or heap allocation)
  • Add support for passing parameters to tasks (like pthread in C)

@thomasarmel
Copy link
Contributor Author

image

@thomasarmel thomasarmel force-pushed the cooperative_multitasking branch from c35e0c4 to 9b5fb22 Compare January 2, 2023 16:12
@thomasarmel
Copy link
Contributor Author

@o8vm

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.

1 participant