1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

PiOS posix scheduler - added simple docu about scheduler work

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1032 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
corvus 2010-07-06 21:56:43 +00:00 committed by corvus
parent 7aa693ed3e
commit ec48207755

View File

@ -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