From ec482077550da62e4a75f21b7a9d4b92cce3ed17 Mon Sep 17 00:00:00 2001 From: corvus Date: Tue, 6 Jul 2010 21:56:43 +0000 Subject: [PATCH] PiOS posix scheduler - added simple docu about scheduler work git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1032 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../GCC/Posix/corvuscorax/scheduler.txt | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 flight/PiOS.posix/posix/Libraries/FreeRTOS/Source/portable/GCC/Posix/corvuscorax/scheduler.txt 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 +