rust_dos icon indicating copy to clipboard operation
rust_dos copied to clipboard

Add cooperative multitasking support

Open thomasarmel opened this issue 3 years ago • 2 comments

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 avatar Jan 02 '23 14:01 thomasarmel

image

thomasarmel avatar Jan 02 '23 14:01 thomasarmel

@o8vm

thomasarmel avatar Mar 01 '23 08:03 thomasarmel