From cd679c092078f7ef88c2b62f161eba41ee413702 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 14 Mar 2008 16:08:11 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@233 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/ch.txt | 9 +- docs/img/states.svg | 474 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 480 insertions(+), 3 deletions(-) create mode 100644 docs/img/states.svg (limited to 'docs') diff --git a/docs/ch.txt b/docs/ch.txt index 257d3d89e..bc6bdc98e 100644 --- a/docs/ch.txt +++ b/docs/ch.txt @@ -59,8 +59,8 @@ * @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 Evt, - * \a Msg, \a IQ, \a OQ, \a HQ,\a FDD, \a HDD. + * The possible groups are: \a Sys, \a Sch, \a VT, \a Thd, \a Sem, \a Mtx, + * \a Evt, \a Msg, \a IQ, \a OQ, \a HQ,\a FDD, \a HDD, \a Dbg. * The suffix is not present for normal APIs but can be one of * the following: "I" for APIs meant to be invoked from an interrupt handler * or within the system mutex zone but not from user code, "S" for APIs only @@ -79,6 +79,10 @@ * 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 states Threads States Diagram + * The image shows how threads can change their state in ChibiOS/RT.
+ * @image html states.png + * * @section warea Thread Working Area * Each thread has its own stack, a Thread structure and a registers dump * structure. All the structures are allocated into a "Thread working area", @@ -87,7 +91,6 @@ * have as many threads you want as long you have enough available RAM * memory. The threads do not use any memory outside the allocated working * area.
- * @image html workspace.png *
* Note that the registers dump is only present when the Thread is not diff --git a/docs/img/states.svg b/docs/img/states.svg new file mode 100644 index 000000000..a7a0b0bd2 --- /dev/null +++ b/docs/img/states.svg @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + Workspace top Thread Structure + chThdCreate() + + Running + + + Ready + + + SuspendedSus + + + Suspended + + + + + + + + + Sleeping + chSchGoSleepS() + + + chSchWakeupS() + + chSchWakeupS()chSchReadyI() + chSchRescheduleS()chSchDoRescheduleI() + + chSchWakeupS()chSchReadyI() + + chSchGoSleepS() + chSchWakeupS() + + Ready + Exited + + chSchGoSleepS()chThdExit() + + -- cgit v1.2.3