aboutsummaryrefslogtreecommitdiffstats
path: root/docs/ch.txt
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-23 16:18:13 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-01-23 16:18:13 +0000
commit819c02b8391e3cadcbe814c84c5c5f366ae41e03 (patch)
treed25958939c5efa5c21ae196f90736579d5e9735d /docs/ch.txt
parent8d51d682db8db8cb49679e5567c66f2b36b490f9 (diff)
downloadChibiOS-819c02b8391e3cadcbe814c84c5c5f366ae41e03.tar.gz
ChibiOS-819c02b8391e3cadcbe814c84c5c5f366ae41e03.tar.bz2
ChibiOS-819c02b8391e3cadcbe814c84c5c5f366ae41e03.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@669 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'docs/ch.txt')
-rw-r--r--docs/ch.txt85
1 files changed, 51 insertions, 34 deletions
diff --git a/docs/ch.txt b/docs/ch.txt
index 416811dc8..aff84eff1 100644
--- a/docs/ch.txt
+++ b/docs/ch.txt
@@ -104,7 +104,7 @@
* @section system_states System States
* When using ChibiOS/RT the system can be in one of the following logical
* operating states:
- * - <b>Initialization</b>. When the system is in this state all the maskable
+ * - <b>Init</b>. When the system is in this state all the maskable
* interrupt sources are disabled. In this state it is not possible to use
* any system API except @p chSysInit(). This state is entered after a
* physical reset.
@@ -146,7 +146,8 @@
digraph example {
rankdir="LR";
node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"];
- init [label="Initialization", style="bold"];
+ edge [fontname=Helvetica, fontsize=8];
+ init [label="Init", style="bold"];
norm [label="Normal", shape=doublecircle];
susp [label="Suspended"];
disab [label="Disabled"];
@@ -155,31 +156,46 @@
slock [label="S-Locked"];
sleep [label="Sleep"];
sri [label="SRI"];
- sfi [label="SFI"];
- init -> norm [label="chSysInit()", fontname=Helvetica, fontsize=8];
- norm -> slock [label="chSysLock()", fontname=Helvetica, fontsize=8, constraint=false];
- slock -> norm [label="chSysUnlock()", fontname=Helvetica, fontsize=8];
- norm -> susp [label="chSysSuspend()", fontname=Helvetica, fontsize=8];
- susp -> disab [label="chSysDisable()", fontname=Helvetica, fontsize=8];
- norm -> disab [label="chSysDisable()", fontname=Helvetica, fontsize=8];
- susp -> norm [label="chSysEnable()", fontname=Helvetica, fontsize=8];
- disab -> norm [label="chSysEnable()", fontname=Helvetica, fontsize=8];
- slock -> ilock [dir="both", label="Context Switch", fontname=Helvetica, fontsize=8];
- norm -> sri [style="dotted", label="Regular IRQ", fontname=Helvetica, fontsize=8];
- norm -> sfi [style="dotted", label="Fast IRQ", fontname=Helvetica, fontsize=8];
- susp -> sfi [style="dotted", label="Fast IRQ", fontname=Helvetica, fontsize=8];
+ init -> norm [label="chSysInit()"];
+ norm -> slock [label="chSysLock()", constraint=false];
+ slock -> norm [label="chSysUnlock()"];
+ norm -> susp [label="chSysSuspend()"];
+ susp -> disab [label="chSysDisable()"];
+ norm -> disab [label="chSysDisable()"];
+ susp -> norm [label="chSysEnable()"];
+ disab -> norm [label="chSysEnable()"];
+ slock -> ilock [label="Context Switch", dir="both"];
+ norm -> sri [label="Regular IRQ", style="dotted"];
sri -> norm [label="Regular IRQ return", fontname=Helvetica, fontsize=8];
- sfi -> norm [label="Fast IRQ return", fontname=Helvetica, fontsize=8];
- sfi -> susp [label="Fast IRQ return", fontname=Helvetica, fontsize=8];
- sri -> ilock [label="chSysLockI()", fontname=Helvetica, fontsize=8, constraint=false];
- ilock -> sri [label="chSysUnlockI()", fontname=Helvetica, fontsize=8];
- norm -> sleep [label="Idle Thread", fontname=Helvetica, fontsize=8];
- sleep -> sri [style="dotted", label="Regular IRQ", fontname=Helvetica, fontsize=8];
- sleep -> sfi [style="dotted", label="Fast IRQ", fontname=Helvetica, fontsize=8];
+ sri -> ilock [label="chSysLockI()", constraint=false];
+ ilock -> sri [label="chSysUnlockI()", fontsize=8];
+ norm -> sleep [label="Idle Thread"];
+ sleep -> sri [label="Regular IRQ", style="dotted"];
+ }
+ * @enddot
+ * Note, the <b>SFI</b>, <b>Halted</b> and <b>SNMI</b> states were not shown
+ * because those are reachable from most states:
+ *
+ * @dot
+ digraph example {
+ rankdir="LR";
+ node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"];
+ edge [fontname=Helvetica, fontsize=8];
+ any1 [label="Any State\nexcept\nDisabled\nand Init"];
+ any2 [label="Any State"];
+ sfi [label="SFI"];
+ halt [label="Halted"];
+ SNMI [label="SNMI"];
+ any1 -> sfi [style="dotted", label="Fast IRQ"];
+ sfi -> any1 [label="Fast IRQ return"];
+ any2 -> halt [label="chSysHalt()"];
+ any2 -> SNMI [label="Synchronous NMI"];
+ any2 -> SNMI [label="Asynchronous NMI", style="dotted"];
+ SNMI -> any2 [label="NMI return"];
+ halt -> SNMI [label="Asynchronous NMI", style="dotted"];
+ SNMI -> halt [label="NMI return"];
}
* @enddot
- * Note, the Halted and SNMI states can be reached from any state and are not
- * shown for simplicity.
*
* @section scheduling Scheduling
* The strategy is very simple the currently ready thread with the highest
@@ -197,22 +213,23 @@
digraph example {
/*rankdir="LR";*/
node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"];
+ edge [fontname=Helvetica, fontsize=8];
start [label="Start", style="bold"];
run [label="Running"];
ready [label="Ready"];
suspend [label="Suspended"];
sleep [label="Sleeping"];
stop [label="Stop", style="bold"];
- start -> suspend [label="chThdInit()", fontname=Helvetica, fontsize=8, constraint=false];
- start -> run [label="chThdCreate()", fontname=Helvetica, fontsize=8];
- start -> ready [label="chThdCreate()", fontname=Helvetica, fontsize=8];
- run -> ready [dir="both", label="Reschedulation", fontname=Helvetica, fontsize=8];
- suspend -> run [label="chThdResume()", fontname=Helvetica, fontsize=8];
- suspend -> ready [label="chThdResume()", fontname=Helvetica, fontsize=8];
- run -> sleep [label="chSchGoSleepS()", fontname=Helvetica, fontsize=8];
- sleep -> run [label="chSchWakepS()", fontname=Helvetica, fontsize=8];
- sleep -> ready [label="chSchWakepS()", fontname=Helvetica, fontsize=8];
- run -> stop [label="chThdExit()", fontname=Helvetica, fontsize=8];
+ start -> suspend [label="chThdInit()", constraint=false];
+ start -> run [label="chThdCreate()"];
+ start -> ready [label="chThdCreate()"];
+ run -> ready [label="Reschedulation", dir="both"];
+ suspend -> run [label="chThdResume()"];
+ suspend -> ready [label="chThdResume()"];
+ run -> sleep [label="chSchGoSleepS()"];
+ sleep -> run [label="chSchWakepS()"];
+ sleep -> ready [label="chSchWakepS()"];
+ run -> stop [label="chThdExit()"];
}
* @enddot
*