diff --git a/flight/PiOS.posix/posix/Libraries/FreeRTOS/Source/portable/GCC/Posix/corvuscorax/scheduler.txt b/flight/PiOS.posix/posix/Libraries/FreeRTOS/Source/portable/GCC/Posix/corvuscorax/scheduler.txt new file mode 100644 index 000000000..dc1815cea --- /dev/null +++ b/flight/PiOS.posix/posix/Libraries/FreeRTOS/Source/portable/GCC/Posix/corvuscorax/scheduler.txt @@ -0,0 +1,42 @@ +thread initial START: + +master gives up running mutex +master waits for sentinel set +master akquires running mutex + +thread akquires RUNNING_MUTEX +threads sets sentinel +thread suspends itself + + + +thread SUSPEND: + +thread gives up RUNNING_MUTEX +thread waits for sig_resume +thread akquires RUNNING_MUTEX +thread runs + + +thread END: + +if other: +delete the other thread +if self: +thread gives up RUNNING_MUTEX +thread sends sig_resume to new active thread +thread self kills + + +thread YIELD +thread sends sig_resume to new active thread +thread suspends itself + + +time tick yield +tick handler sends SUSPEND to running thread +tick handler akquires RUNNING_MUTEX +tick handler sends sig_resume to new active thread +tock handler gives up RUNNING_MUTEX +tick handler ends +