From c1ef5c1ac7c65f7d9ffbafea09c0516e7ec632f3 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 29 Jan 2009 18:43:42 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@681 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 240 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 240 insertions(+) create mode 100644 docs/src/concepts.dox (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox new file mode 100644 index 000000000..cfa5bfbc3 --- /dev/null +++ b/docs/src/concepts.dox @@ -0,0 +1,240 @@ +/* + ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + + This file is part of ChibiOS/RT. + + ChibiOS/RT is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + ChibiOS/RT is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/** + * @page Concepts Concepts + * @{ + * @brief ChibiOS/RT Concepts and Architecture + * @section naming Naming Conventions + * ChibiOS/RT APIs are all named following this convention: + * @a ch\\\(). + * The possible groups are: @a Sys, @a Sch, @a VT, @a Thd, @a Sem, @a Mtx, + * @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a HQ, @a FDD, @a HDD, @a Dbg, + * @a Heap, @a Pool. + * + * @section api_suffixes API Names Suffixes + * The suffix can be one of the following: + * - None, APIs without any suffix can be invoked only from the user + * code in the Normal state unless differently specified. See + * @ref system_states. + * - "I", I-Class APIs are invokable only from the I-Locked or + * S-Locked states. See @ref system_states. + * - "S", S-Class APIs are invokable only from the S-Locked + * state. See @ref system_states. + * Examples: @p chThdCreateStatic(), @p chSemSignalI(), @p chIQGetTimeout(). + * + * @section interrupt_classes Interrupt Classes + * In ChibiOS/RT there are three logical interrupt classes: + * - Regular Interrupts. Maskable interrupt sources that cannot + * preempt the kernel code and are thus able to invoke operating system APIs + * from within their handlers. The interrupt handlers belonging to this class + * must be written following some rules. See the @ref System APIs group and + * @ref article_interrupts. + * - Fast Interrupts. Maskable interrupt sources with the ability + * to preempt the kernel code and thus have a lower latency and are less + * subject to jitter, see @ref article_jitter. Such sources are not + * supported on all the architectures.
+ * Fast interrupts are not allowed to invoke any operating system API from + * within their handlers. Fast interrupt sources may however pend a lower + * priority regular interrupt where access to the operating system is + * possible. + * - Non Maskable Interrupts. Non maskable interrupt sources are + * totally out of the operating system control and have the lowest latency. + * Such sources are not supported on all the architectures. + * + * The mapping of the above logical classes into physical interrupts priorities + * is, of course, port dependent. See the documentation of the various ports + * for details. + * + * @section system_states System States + * When using ChibiOS/RT the system can be in one of the following logical + * operating states: + * - Init. 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. + * - Normal. All the interrupt sources are enabled and the system APIs + * are accessible, threads are running. + * - Suspended. In this state the fast interrupt sources are enabled but + * the regular interrupt sources are not. In this state it is not possible + * to use any system API except @p chSysDisable() or @p chSysEnable() in + * order to change state. + * - Disabled. When the system is in this state both the maskable + * regular and fast interrupt sources are disabled. In this state it is not + * possible to use any system API except @p chSysSuspend() or + * @p chSysEnable() in order to change state. + * - Sleep. Architecture-dependent low power mode, the idle thread + * goes in this state and waits for interrupts, after servicing the interrupt + * the Normal state is restored and the scheduler has a chance to reschedule. + * - S-Locked. Kernel locked and regular interrupt sources disabled. + * Fast interrupt sources are enabled. S-Class and I-Class APIs are + * invokable in this state. + * - I-Locked. Kernel locked and regular interrupt sources disabled. + * I-Class APIs are invokable from this state. + * - Serving Regular Interrupt. No system APIs are accessible but it is + * possible to switch to the I-Locked state using @p chSysLockFromIsr() and + * then invoke any I-Class API. Interrupt handlers can be preemptable on some + * architectures thus is important to switch to I-Locked state before + * invoking system APIs. + * - Serving Fast Interrupt. System APIs are not accessible. + * - Serving Non-Maskable Interrupt. System APIs are not accessible. + * - Halted. All interrupt sources are disabled and system stopped into + * an infinite loop. This state can be reached if the debug mode is activated + * and an error is detected or after explicitly invoking + * @p chSysHalt(). + * + * Note that the above state are just Logical States that may have no + * real associated machine state on some architectures. The following diagram + * shows the possible transitions between the 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]; + init [label="Init", style="bold"]; + norm [label="Normal", shape=doublecircle]; + susp [label="Suspended"]; + disab [label="Disabled"]; + slock [label="S-Locked"]; + ilock [label="I-Locked"]; + slock [label="S-Locked"]; + sleep [label="Sleep"]; + sri [label="SRI"]; + 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]; + sri -> ilock [label="chSysLockFromIsr()", constraint=false]; + ilock -> sri [label="chSysUnlockFromIsr()", fontsize=8]; + norm -> sleep [label="Idle Thread"]; + sleep -> sri [label="Regular IRQ", style="dotted"]; + } + * @enddot + * Note, the SFI, Halted and SNMI 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 *"]; + 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 + * @attention * except: Init, Halt, SNMI, Disabled. + * + * @section scheduling Scheduling + * The strategy is very simple the currently ready thread with the highest + * priority is executed. If more than one thread with equal priority are + * eligible for execution then they are executed in a round-robin way, the + * CPU time slice constant is configurable. The ready list is a double linked + * list of threads ordered by priority.

+ * @image html readylist.png + * Note that the currently running thread is not in the ready list, the list + * only contains the threads ready to be executed but still actually waiting. + * + * @section thread_states Threads States + * The image shows how threads can change their state in ChibiOS/RT.
+ * @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]; + 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()", 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 + * + * @section priority Priority Levels + * Priorities in ChibiOS/RT are a contiguous numerical range but the initial + * and final values are not enforced.
+ * The following table describes the various priority boundaries (from lowest + * to highest): + * - @p IDLEPRIO, this is the lowest priority level and is reserved for the + * idle thread, no other threads should share this priority level. This is + * the lowest numerical value of the priorities space. + * - @p LOWPRIO, the lowest priority level that can be assigned to an user + * thread. + * - @p NORMALPRIO, this is the central priority level for user threads. It is + * advisable to assign priorities to threads as values relative to + * @p NORMALPRIO, as example NORMALPRIO-1 or NORMALPRIO+4, this ensures the + * portability of code should the numerical range change in future + * implementations. + * - @p HIGHPRIO, the highest priority level that can be assigned to an user + * thread. + * - @p ABSPRO, absolute maximum software priority level, it can be higher than + * @p HIGHPRIO but the numerical values above @p HIGHPRIO up to @p ABSPRIO + * (inclusive) are reserved. This is the highest numerical value of the + * priorities space. + * + * @section warea Thread Working Area + * Each thread has its own stack, a Thread structure and some preemption + * areas. All the structures are allocated into a "Thread Working Area", + * a thread private heap, usually statically declared in your code. + * Threads do not use any memory outside the allocated working area + * except when accessing static shared data.

+ * @image html workspace.png + *
+ * Note that the preemption area is only present when the thread is not + * running (switched out), the context switching is done by pushing the + * registers on the stack of the switched-out thread and popping the registers + * of the switched-in thread from its stack. + * The preemption area can be divided in up to three structures: + * - External Context. + * - Interrupt Stack. + * - Internal Context. + * + * See the @ref Core documentation for details, the area may change on + * the various ports and some structures may not be present (or be zero-sized). + */ +/** @} */ -- cgit v1.2.3 From 41eeaff123f182af8ba629570d684207ee8bf12a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 31 Jan 2009 10:30:16 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@701 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index cfa5bfbc3..531340560 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -18,7 +18,7 @@ */ /** - * @page Concepts Concepts + * @page concepts Concepts * @{ * @brief ChibiOS/RT Concepts and Architecture * @section naming Naming Conventions -- cgit v1.2.3 From 528e9fea357b8b24069d99657230ba28968f5d0c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 2 Feb 2009 21:07:27 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@713 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 531340560..9c0a1d9c2 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -33,10 +33,10 @@ * - None, APIs without any suffix can be invoked only from the user * code in the Normal state unless differently specified. See * @ref system_states. - * - "I", I-Class APIs are invokable only from the I-Locked or - * S-Locked states. See @ref system_states. - * - "S", S-Class APIs are invokable only from the S-Locked - * state. See @ref system_states. + * - @anchor I-Class "I", I-Class APIs are invokable only from the + * I-Locked or S-Locked states. See @ref system_states. + * - @anchor S-Class "S", S-Class APIs are invokable only from the + * S-Locked state. See @ref system_states. * Examples: @p chThdCreateStatic(), @p chSemSignalI(), @p chIQGetTimeout(). * * @section interrupt_classes Interrupt Classes @@ -83,14 +83,14 @@ * goes in this state and waits for interrupts, after servicing the interrupt * the Normal state is restored and the scheduler has a chance to reschedule. * - S-Locked. Kernel locked and regular interrupt sources disabled. - * Fast interrupt sources are enabled. S-Class and I-Class APIs are + * Fast interrupt sources are enabled. @ref S-Class and @ref I-Class APIs are * invokable in this state. * - I-Locked. Kernel locked and regular interrupt sources disabled. - * I-Class APIs are invokable from this state. + * @ref I-Class APIs are invokable from this state. * - Serving Regular Interrupt. No system APIs are accessible but it is * possible to switch to the I-Locked state using @p chSysLockFromIsr() and - * then invoke any I-Class API. Interrupt handlers can be preemptable on some - * architectures thus is important to switch to I-Locked state before + * then invoke any @ref I-Class API. Interrupt handlers can be preemptable on + * some architectures thus is important to switch to I-Locked state before * invoking system APIs. * - Serving Fast Interrupt. System APIs are not accessible. * - Serving Non-Maskable Interrupt. System APIs are not accessible. -- cgit v1.2.3 From 9869b77a9a8af56192e4bcf65b70757bb12ca514 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 5 Feb 2009 21:26:18 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@723 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 9c0a1d9c2..360e5f4f2 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -37,6 +37,7 @@ * I-Locked or S-Locked states. See @ref system_states. * - @anchor S-Class "S", S-Class APIs are invokable only from the * S-Locked state. See @ref system_states. + * . * Examples: @p chThdCreateStatic(), @p chSemSignalI(), @p chIQGetTimeout(). * * @section interrupt_classes Interrupt Classes @@ -57,7 +58,7 @@ * - Non Maskable Interrupts. Non maskable interrupt sources are * totally out of the operating system control and have the lowest latency. * Such sources are not supported on all the architectures. - * + * . * The mapping of the above logical classes into physical interrupts priorities * is, of course, port dependent. See the documentation of the various ports * for details. @@ -98,7 +99,7 @@ * an infinite loop. This state can be reached if the debug mode is activated * and an error is detected or after explicitly invoking * @p chSysHalt(). - * + * . * Note that the above state are just Logical States that may have no * real associated machine state on some architectures. The following diagram * shows the possible transitions between the states: @@ -216,7 +217,7 @@ * @p HIGHPRIO but the numerical values above @p HIGHPRIO up to @p ABSPRIO * (inclusive) are reserved. This is the highest numerical value of the * priorities space. - * + * . * @section warea Thread Working Area * Each thread has its own stack, a Thread structure and some preemption * areas. All the structures are allocated into a "Thread Working Area", @@ -233,7 +234,7 @@ * - External Context. * - Interrupt Stack. * - Internal Context. - * + * . * See the @ref Core documentation for details, the area may change on * the various ports and some structures may not be present (or be zero-sized). */ -- cgit v1.2.3 From 773f580e37e9248096bc25eb0e64af292a5f53bd Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 8 Mar 2009 15:58:28 +0000 Subject: Added architecture diagram to the concepts page. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@820 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 360e5f4f2..d8d874bac 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -18,9 +18,19 @@ */ /** - * @page concepts Concepts + * @page concepts Concepts and Architecture * @{ * @brief ChibiOS/RT Concepts and Architecture + * - @ref naming + * - @ref api_suffixes + * - @ref interrupt_classes + * - @ref system_states + * - @ref scheduling + * - @ref thread_states + * - @ref priority + * - @ref warea + * - @ref architecture + * . * @section naming Naming Conventions * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). @@ -218,7 +228,7 @@ * (inclusive) are reserved. This is the highest numerical value of the * priorities space. * . - * @section warea Thread Working Area + * @section warea Threads Working Area * Each thread has its own stack, a Thread structure and some preemption * areas. All the structures are allocated into a "Thread Working Area", * a thread private heap, usually statically declared in your code. @@ -237,5 +247,18 @@ * . * See the @ref Core documentation for details, the area may change on * the various ports and some structures may not be present (or be zero-sized). + * + * @section architecture Architectural Diagram + * The following diagram shows the relationships among the hardware, the + * various ChibiOS/RT subsystems and the application code. + *

+ * @image html arch.png + *
+ * In this diagram the device drivers are at the same level of the application + * code because both have access to the system services and can directly + * access the hardware.
+ * Of course it is possible to create in the application architecture several + * extra layers, this is just not part of the kernel architecture but part of + * the overall system design. */ /** @} */ -- cgit v1.2.3 From da4f9beaee8f1f8f344012b4d9a122462a6c802e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 10 Mar 2009 15:31:58 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index d8d874bac..8ef626c01 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,9 +34,9 @@ * @section naming Naming Conventions * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). - * The possible groups are: @a Sys, @a Sch, @a VT, @a Thd, @a Sem, @a Mtx, - * @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a HQ, @a FDD, @a HDD, @a Dbg, - * @a Heap, @a Pool. + * The possible groups are: @a Sys, @a Sch, @a Time @a VT, @a Thd, @a Sem, + * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a HQ, @a FDD, @a HDD, + * @a Dbg, @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes * The suffix can be one of the following: -- cgit v1.2.3 From 07e6ae3a59c7191facaaada4b4549587ae5ed0fa Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 18 Mar 2009 19:53:33 +0000 Subject: Fixed bug 2692510 and some other small documentation errors. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@852 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 8ef626c01..cc768052e 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -62,7 +62,7 @@ * subject to jitter, see @ref article_jitter. Such sources are not * supported on all the architectures.
* Fast interrupts are not allowed to invoke any operating system API from - * within their handlers. Fast interrupt sources may however pend a lower + * within their handlers. Fast interrupt sources may, however, pend a lower * priority regular interrupt where access to the operating system is * possible. * - Non Maskable Interrupts. Non maskable interrupt sources are @@ -110,7 +110,7 @@ * and an error is detected or after explicitly invoking * @p chSysHalt(). * . - * Note that the above state are just Logical States that may have no + * Note that the above states are just Logical States that may have no * real associated machine state on some architectures. The following diagram * shows the possible transitions between the states: * -- cgit v1.2.3 From fad3a0802ac7f43da5f7dcf68e369dc735de3ed2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 2 Apr 2009 13:41:54 +0000 Subject: Documentation fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@864 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index cc768052e..725be9b52 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,7 +34,7 @@ * @section naming Naming Conventions * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). - * The possible groups are: @a Sys, @a Sch, @a Time @a VT, @a Thd, @a Sem, + * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a HQ, @a FDD, @a HDD, * @a Dbg, @a Heap, @a Pool. * -- cgit v1.2.3 From 62a6638eb544f2c3d9022bcb34cae181aa8f7aae Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 3 May 2009 09:51:01 +0000 Subject: Added I/O queue checks to the channels, added notes in the readme, improved the FullDuplexDriver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@940 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 725be9b52..ed37ed349 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -35,8 +35,8 @@ * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, - * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a HQ, @a FDD, @a HDD, - * @a Dbg, @a Heap, @a Pool. + * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a IO, @a FDD, @a Dbg, + * @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes * The suffix can be one of the following: -- cgit v1.2.3 From aea323e12179301b00e7766fc97dc3d3b51576d9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 7 May 2009 15:24:47 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@949 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 -- 1 file changed, 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index ed37ed349..8a7418b53 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -19,7 +19,6 @@ /** * @page concepts Concepts and Architecture - * @{ * @brief ChibiOS/RT Concepts and Architecture * - @ref naming * - @ref api_suffixes @@ -261,4 +260,3 @@ * extra layers, this is just not part of the kernel architecture but part of * the overall system design. */ -/** @} */ -- cgit v1.2.3 From 397ccffac55ffd139d0e3e82add83e51413c1347 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 30 Aug 2009 06:59:43 +0000 Subject: Documentation reorganization. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1133 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 8a7418b53..8add4464c 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -54,7 +54,7 @@ * - Regular Interrupts. Maskable interrupt sources that cannot * preempt the kernel code and are thus able to invoke operating system APIs * from within their handlers. The interrupt handlers belonging to this class - * must be written following some rules. See the @ref System APIs group and + * must be written following some rules. See the @ref system APIs group and * @ref article_interrupts. * - Fast Interrupts. Maskable interrupt sources with the ability * to preempt the kernel code and thus have a lower latency and are less @@ -244,7 +244,7 @@ * - Interrupt Stack. * - Internal Context. * . - * See the @ref Core documentation for details, the area may change on + * See the @ref core documentation for details, the area may change on * the various ports and some structures may not be present (or be zero-sized). * * @section architecture Architectural Diagram -- cgit v1.2.3 From ccd53468b81e03732a5d3c6da3eb0c541aca738b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 30 Aug 2009 16:35:39 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1143 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 8add4464c..67b01f8b3 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,7 +34,7 @@ * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, - * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a IO, @a FDD, @a Dbg, + * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a IO, @a Dbg, * @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes -- cgit v1.2.3 From 34fd822f84d409fa649934251fae01994de7888b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 17 Oct 2009 09:21:59 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1226 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 67b01f8b3..bab26d064 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -35,7 +35,7 @@ * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a IO, @a Dbg, - * @a Heap, @a Pool. + * @a Core, @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes * The suffix can be one of the following: -- cgit v1.2.3 From 855fe2391d07c5dab27129ad626541482fe8d782 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Tue, 5 Jan 2010 17:14:09 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1501 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index bab26d064..d6364513b 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,7 +34,7 @@ * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, - * @a Mtx, @a Cond, @a Evt, @a Msg, @a IQ, @a OQ, @a IO, @a Dbg, + * @a Mtx, @a Cond, @a Evt, @a Msg, @a Stream, @a IO, @a IQ, @a OQ, @a Dbg, * @a Core, @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes -- cgit v1.2.3 From 1eebe078ffbb85c3fb8a14db4d241502b27145bf Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 7 Jan 2010 15:23:38 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1509 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index d6364513b..49c96b2c8 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,8 +34,8 @@ * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, - * @a Mtx, @a Cond, @a Evt, @a Msg, @a Stream, @a IO, @a IQ, @a OQ, @a Dbg, - * @a Core, @a Heap, @a Pool. + * @a Mtx, @a Cond, @a Evt, @a Msg, @a SequentialStream, @a IO, @a IQ, @a OQ, + * @a Dbg, @a Core, @a Heap, @a Pool. * * @section api_suffixes API Names Suffixes * The suffix can be one of the following: -- cgit v1.2.3 From 157b6f9695e7f72f2d54b231c19cb4045710ed01 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Feb 2010 07:24:53 +0000 Subject: Updated license dates. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1646 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 49c96b2c8..b6a9e8630 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -1,5 +1,5 @@ /* - ChibiOS/RT - Copyright (C) 2006-2007 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 508b7bc93297fcb74af43b11b1435aa96add3c85 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 25 Feb 2010 16:48:00 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1675 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index b6a9e8630..e1d5f6156 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -18,8 +18,8 @@ */ /** - * @page concepts Concepts and Architecture - * @brief ChibiOS/RT Concepts and Architecture + * @page concepts Kernel Concepts + * @brief ChibiOS/RT Kernel Concepts * - @ref naming * - @ref api_suffixes * - @ref interrupt_classes @@ -28,7 +28,6 @@ * - @ref thread_states * - @ref priority * - @ref warea - * - @ref architecture * . * @section naming Naming Conventions * ChibiOS/RT APIs are all named following this convention: @@ -52,10 +51,10 @@ * @section interrupt_classes Interrupt Classes * In ChibiOS/RT there are three logical interrupt classes: * - Regular Interrupts. Maskable interrupt sources that cannot - * preempt the kernel code and are thus able to invoke operating system APIs - * from within their handlers. The interrupt handlers belonging to this class - * must be written following some rules. See the @ref system APIs group and - * @ref article_interrupts. + * preempt (small parts of) the kernel code and are thus able to invoke + * operating system APIs from within their handlers. The interrupt handlers + * belonging to this class must be written following some rules. See the + * @ref system APIs group and @ref article_interrupts. * - Fast Interrupts. Maskable interrupt sources with the ability * to preempt the kernel code and thus have a lower latency and are less * subject to jitter, see @ref article_jitter. Such sources are not @@ -246,17 +245,4 @@ * . * See the @ref core documentation for details, the area may change on * the various ports and some structures may not be present (or be zero-sized). - * - * @section architecture Architectural Diagram - * The following diagram shows the relationships among the hardware, the - * various ChibiOS/RT subsystems and the application code. - *

- * @image html arch.png - *
- * In this diagram the device drivers are at the same level of the application - * code because both have access to the system services and can directly - * access the hardware.
- * Of course it is possible to create in the application architecture several - * extra layers, this is just not part of the kernel architecture but part of - * the overall system design. */ -- cgit v1.2.3 From 10b1366c43353749a182c60c7dfbe2e9fa2fd567 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 26 Feb 2010 14:03:23 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1676 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index e1d5f6156..6ddc8035f 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -174,7 +174,42 @@ * eligible for execution then they are executed in a round-robin way, the * CPU time slice constant is configurable. The ready list is a double linked * list of threads ordered by priority.

- * @image html readylist.png + * @dot + digraph example { + rankdir="LR"; + + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + edge [fontname=Helvetica, fontsize=8]; + + subgraph cluster_running { + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + currp [label="'currp'\npointer", style="bold"]; + T4 [label="Tuser(4)\nprio=100"]; + label = "Currently Running Thread"; + penwidth = 0; + } + + subgraph cluster_rlist { + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + rh [label="ready list\nheader\nprio=0", style="bold"]; + Ti [label="Tidle\nprio=1"]; + Tm [label="Tmain\nprio=64"]; + T1 [label="Tuser(1)\nprio=32"]; + T2 [label="Tuser(2)\nprio=32"]; + T3 [label="Tuser(3)\nprio=80"]; + label = "Threads Ready for Execution"; + penwidth = 0; + } + + currp -> T4 + rh -> Ti -> T1 -> T2 -> Tm -> T3 -> rh [label="p_next"]; + rh -> T3 -> Tm -> T2 -> T1 -> Ti -> rh [label="p_prev"]; + } + * @enddot + *
* Note that the currently running thread is not in the ready list, the list * only contains the threads ready to be executed but still actually waiting. * -- cgit v1.2.3 From 88d93ba5bf533bfd49df40ba7998b747d1fbadc2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 17 May 2010 15:02:27 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1931 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 6ddc8035f..9c09041a7 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -229,7 +229,7 @@ start -> suspend [label="chThdInit()", constraint=false]; start -> run [label="chThdCreate()"]; start -> ready [label="chThdCreate()"]; - run -> ready [label="Reschedulation", dir="both"]; + run -> ready [label="Reschedule", dir="both"]; suspend -> run [label="chThdResume()"]; suspend -> ready [label="chThdResume()"]; run -> sleep [label="chSchGoSleepS()"]; -- cgit v1.2.3 From fd9d0b74cacfeb38e223c13de25185ea713cad3d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 18 Sep 2010 10:08:34 +0000 Subject: Improvements to the concepts article. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2181 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 246 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 181 insertions(+), 65 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 9c09041a7..35c086506 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -36,7 +36,7 @@ * @a Mtx, @a Cond, @a Evt, @a Msg, @a SequentialStream, @a IO, @a IQ, @a OQ, * @a Dbg, @a Core, @a Heap, @a Pool. * - * @section api_suffixes API Names Suffixes + * @section api_suffixes API Name Suffixes * The suffix can be one of the following: * - None, APIs without any suffix can be invoked only from the user * code in the Normal state unless differently specified. See @@ -112,58 +112,104 @@ * real associated machine state on some architectures. The following diagram * shows the possible transitions between the states: * + * @if LATEX_PDF * @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]; - init [label="Init", style="bold"]; - norm [label="Normal", shape=doublecircle]; - susp [label="Suspended"]; - disab [label="Disabled"]; - slock [label="S-Locked"]; - ilock [label="I-Locked"]; - slock [label="S-Locked"]; - sleep [label="Sleep"]; - sri [label="SRI"]; - 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]; - sri -> ilock [label="chSysLockFromIsr()", constraint=false]; - ilock -> sri [label="chSysUnlockFromIsr()", fontsize=8]; - norm -> sleep [label="Idle Thread"]; - sleep -> sri [label="Regular IRQ", style="dotted"]; + size="5, 7"; + rankdir="LR"; + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"]; + edge [fontname=Helvetica, fontsize=8]; + init [label="Init", style="bold"]; + norm [label="Normal", shape=doublecircle]; + susp [label="Suspended"]; + disab [label="Disabled"]; + slock [label="S-Locked"]; + ilock [label="I-Locked"]; + slock [label="S-Locked"]; + sleep [label="Sleep"]; + sri [label="SRI"]; + 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()"]; + disab -> susp [label="chSysSuspend()"]; + slock -> ilock [label="Context Switch", dir="both"]; + norm -> sri [label="Regular IRQ", style="dotted"]; + sri -> norm [label="Regular IRQ return", fontname=Helvetica, fontsize=8]; + sri -> ilock [label="chSysLockFromIsr()", constraint=false]; + ilock -> sri [label="chSysUnlockFromIsr()", fontsize=8]; + norm -> sleep [label="Idle Thread"]; + sleep -> sri [label="Regular IRQ", style="dotted"]; + } + * @enddot + * @else + * @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]; + init [label="Init", style="bold"]; + norm [label="Normal", shape=doublecircle]; + susp [label="Suspended"]; + disab [label="Disabled"]; + slock [label="S-Locked"]; + ilock [label="I-Locked"]; + slock [label="S-Locked"]; + sleep [label="Sleep"]; + sri [label="SRI"]; + 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()"]; + disab -> susp [label="chSysSuspend()"]; + slock -> ilock [label="Context Switch", dir="both"]; + norm -> sri [label="Regular IRQ", style="dotted"]; + sri -> norm [label="Regular IRQ return", fontname=Helvetica, fontsize=8]; + sri -> ilock [label="chSysLockFromIsr()", constraint=false]; + ilock -> sri [label="chSysUnlockFromIsr()", fontsize=8]; + norm -> sleep [label="Idle Thread"]; + sleep -> sri [label="Regular IRQ", style="dotted"]; } * @enddot + * @endif * Note, the SFI, Halted and SNMI 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 *"]; - 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"]; + size="5, 7"; + 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 *"]; + sfi [label="SFI"]; + any1 -> sfi [style="dotted", label="Fast IRQ"]; + sfi -> any1 [label="Fast IRQ return"]; + } + * @enddot + * @dot + digraph example { + size="5, 7"; + rankdir="LR"; + node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"]; + edge [fontname=Helvetica, fontsize=8]; + any2 [label="Any State"]; + halt [label="Halted"]; + SNMI [label="SNMI"]; + 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 * @attention * except: Init, Halt, SNMI, Disabled. @@ -174,8 +220,10 @@ * eligible for execution then they are executed in a round-robin way, the * CPU time slice constant is configurable. The ready list is a double linked * list of threads ordered by priority.

+ * @if LATEX_PDF * @dot digraph example { + size="5, 7"; rankdir="LR"; node [shape=square, fontname=Helvetica, fontsize=8, @@ -209,35 +257,99 @@ rh -> T3 -> Tm -> T2 -> T1 -> Ti -> rh [label="p_prev"]; } * @enddot + * @else + * @dot + digraph example { + rankdir="LR"; + + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + edge [fontname=Helvetica, fontsize=8]; + + subgraph cluster_running { + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + currp [label="'currp'\npointer", style="bold"]; + T4 [label="Tuser(4)\nprio=100"]; + label = "Currently Running Thread"; + penwidth = 0; + } + + subgraph cluster_rlist { + node [shape=square, fontname=Helvetica, fontsize=8, + fixedsize="true", width="0.6", height="0.5"]; + rh [label="ready list\nheader\nprio=0", style="bold"]; + Ti [label="Tidle\nprio=1"]; + Tm [label="Tmain\nprio=64"]; + T1 [label="Tuser(1)\nprio=32"]; + T2 [label="Tuser(2)\nprio=32"]; + T3 [label="Tuser(3)\nprio=80"]; + label = "Threads Ready for Execution"; + penwidth = 0; + } + + currp -> T4 + rh -> Ti -> T1 -> T2 -> Tm -> T3 -> rh [label="p_next"]; + rh -> T3 -> Tm -> T2 -> T1 -> Ti -> rh [label="p_prev"]; + } + * @enddot + * @endif *
* Note that the currently running thread is not in the ready list, the list * only contains the threads ready to be executed but still actually waiting. * - * @section thread_states Threads States + * @section thread_states Thread States * The image shows how threads can change their state in ChibiOS/RT.
+ * @if LATEX_PDF + * @dot + digraph example { + size="5, 7"; + 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()", constraint=false]; + start -> run [label="chThdCreate()"]; + start -> ready [label="chThdCreate()"]; + run -> ready [label="Reschedule", dir="both"]; + suspend -> run [label="chThdResume()"]; + suspend -> ready [label="chThdResume()"]; + run -> sleep [label="chSchGoSleepS()"]; + sleep -> run [label="chSchWakepuS()"]; + sleep -> ready [label="chSchWakepuS()"]; + run -> stop [label="chThdExit()"]; + } + * @enddot + * @else * @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]; - 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()", constraint=false]; - start -> run [label="chThdCreate()"]; - start -> ready [label="chThdCreate()"]; - run -> ready [label="Reschedule", 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()"]; + 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()", constraint=false]; + start -> run [label="chThdCreate()"]; + start -> ready [label="chThdCreate()"]; + run -> ready [label="Reschedule", dir="both"]; + suspend -> run [label="chThdResume()"]; + suspend -> ready [label="chThdResume()"]; + run -> sleep [label="chSchGoSleepS()"]; + sleep -> run [label="chSchWakepuS()"]; + sleep -> ready [label="chSchWakepuS()"]; + run -> stop [label="chThdExit()"]; } * @enddot + * @endif * * @section priority Priority Levels * Priorities in ChibiOS/RT are a contiguous numerical range but the initial @@ -261,13 +373,17 @@ * (inclusive) are reserved. This is the highest numerical value of the * priorities space. * . - * @section warea Threads Working Area + * @section warea Thread Working Area * Each thread has its own stack, a Thread structure and some preemption * areas. All the structures are allocated into a "Thread Working Area", * a thread private heap, usually statically declared in your code. * Threads do not use any memory outside the allocated working area * except when accessing static shared data.

+ * @if LATEX_PDF + * @image latex workspace.eps + * @else * @image html workspace.png + * @endif *
* Note that the preemption area is only present when the thread is not * running (switched out), the context switching is done by pushing the -- cgit v1.2.3 From a6856d757a7960e9c50cb2cdce3e31ace9671541 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 3 Oct 2010 13:20:13 +0000 Subject: Removed redundant articles in the generated documentation. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2232 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 35c086506..bcb6a5b97 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -54,11 +54,15 @@ * preempt (small parts of) the kernel code and are thus able to invoke * operating system APIs from within their handlers. The interrupt handlers * belonging to this class must be written following some rules. See the - * @ref system APIs group and @ref article_interrupts. + * @ref system APIs group and the web article + * + * How to write interrupt handlers. * - Fast Interrupts. Maskable interrupt sources with the ability * to preempt the kernel code and thus have a lower latency and are less - * subject to jitter, see @ref article_jitter. Such sources are not - * supported on all the architectures.
+ * subject to jitter, see the web article + * + * Response Time and Jitter. + * Such sources are not supported on all the architectures.
* Fast interrupts are not allowed to invoke any operating system API from * within their handlers. Fast interrupt sources may, however, pend a lower * priority regular interrupt where access to the operating system is @@ -394,6 +398,6 @@ * - Interrupt Stack. * - Internal Context. * . - * See the @ref core documentation for details, the area may change on + * See the port documentation for details, the area may change on * the various ports and some structures may not be present (or be zero-sized). */ -- cgit v1.2.3 From e7e79a6ccb4f3e320b2b8b7bad1b14d65218641d Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 18 Mar 2011 18:38:08 +0000 Subject: License updated. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2827 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index bcb6a5b97..f1047b6e0 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -1,5 +1,6 @@ /* - ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio. + ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, + 2011 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From c39d08fc2ae9c43f73114e24292520306bddde19 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 23 Sep 2011 15:48:55 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3384 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index f1047b6e0..a0c6a4f76 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -34,8 +34,8 @@ * ChibiOS/RT APIs are all named following this convention: * @a ch\\\(). * The possible groups are: @a Sys, @a Sch, @a Time, @a VT, @a Thd, @a Sem, - * @a Mtx, @a Cond, @a Evt, @a Msg, @a SequentialStream, @a IO, @a IQ, @a OQ, - * @a Dbg, @a Core, @a Heap, @a Pool. + * @a Mtx, @a Cond, @a Evt, @a Msg, @a Reg, @a SequentialStream, @a IO, @a IQ, + * @a OQ, @a Dbg, @a Core, @a Heap, @a Pool. * * @section api_suffixes API Name Suffixes * The suffix can be one of the following: @@ -308,17 +308,20 @@ * @if LATEX_PDF * @dot digraph example { - size="5, 7"; rankdir="LR"; node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.75", height="0.75"]; + size="5, 7"; + 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()", constraint=false]; + + start -> suspend [label="\n chThdCreateI()", constraint=false, dir=back]; start -> run [label="chThdCreate()"]; start -> ready [label="chThdCreate()"]; run -> ready [label="Reschedule", dir="both"]; @@ -335,14 +338,17 @@ 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()", constraint=false]; + + start -> suspend [label="\n chThdCreateI()", constraint=false, dir=back]; start -> run [label="chThdCreate()"]; start -> ready [label="chThdCreate()"]; run -> ready [label="Reschedule", dir="both"]; -- cgit v1.2.3 From de5dcbba856524599a8f06d3a9bdbf1b01db44c2 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 21 Jan 2012 14:29:42 +0000 Subject: License text updated with new year. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3846 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index a0c6a4f76..d2d311cfc 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011 Giovanni Di Sirio. + 2011,2012 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From 184a71345c6a36a9a8664eda8fbcc3ea728267a8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 2 Feb 2013 10:58:09 +0000 Subject: Updated license years. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5102 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index d2d311cfc..150c62bc5 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -1,6 +1,6 @@ /* ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010, - 2011,2012 Giovanni Di Sirio. + 2011,2012,2013 Giovanni Di Sirio. This file is part of ChibiOS/RT. -- cgit v1.2.3 From aef5278c9081ccbf0b5964bf1ff1951c75a09823 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 8 Jun 2013 07:19:55 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5824 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/src/concepts.dox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/src/concepts.dox') diff --git a/docs/src/concepts.dox b/docs/src/concepts.dox index 150c62bc5..f46f8b06b 100644 --- a/docs/src/concepts.dox +++ b/docs/src/concepts.dox @@ -55,7 +55,7 @@ * preempt (small parts of) the kernel code and are thus able to invoke * operating system APIs from within their handlers. The interrupt handlers * belonging to this class must be written following some rules. See the - * @ref system APIs group and the web article + * system APIs group and the web article * * How to write interrupt handlers. * - Fast Interrupts. Maskable interrupt sources with the ability -- cgit v1.2.3