Quantum Leaps 10 éve
szülő
commit
8dcb40fec0
39 módosított fájl, 1243 hozzáadás és 127 törlés
  1. 3 1
      doxygen/Doxyfile
  2. 2 1
      doxygen/Doxyfile-CHM
  3. 360 0
      doxygen/Doxyfile-DOC
  4. 2 2
      doxygen/history.cc
  5. 0 0
      doxygen/img/file_c.png
  6. 0 0
      doxygen/img/file_cpp.png
  7. BIN
      doxygen/img/file_h.png
  8. BIN
      doxygen/img/file_tcl.png
  9. BIN
      doxygen/img/file_wish.png
  10. 5 3
      doxygen/img/img.htm
  11. 3 3
      doxygen/main.cc
  12. 43 42
      doxygen/metrics.cc
  13. 24 14
      doxygen/ql.css
  14. 175 0
      doxygen/srs.cc
  15. 15 5
      doxygen/struct.cc
  16. 110 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.cproject
  17. 26 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.project
  18. 13 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/targetConfigs/Tiva TM4C123GH6PM.ccxml
  19. 9 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/targetConfigs/readme.txt
  20. 52 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.cproject
  21. 26 0
      examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.project
  22. 80 0
      examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.code_review_properties
  23. 128 0
      examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.cproject
  24. 27 0
      examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.project
  25. 3 3
      examples/msp430/blinky_msp-exp430f5529lp/qk/ccs/.cproject
  26. 6 2
      include/qf.h
  27. 2 2
      ports/arm-cm/qk/iar/qf_port.h
  28. 3 2
      ports/arm-cm/qk/ti/qf_port.h
  29. 1 1
      ports/arm-cm/qv/arm/qf_port.h
  30. 4 4
      ports/arm-cm/qv/gnu/qf_port.h
  31. 3 2
      ports/arm-cm/qv/iar/qf_port.h
  32. 3 3
      ports/arm-cm/qv/ti/qf_port.h
  33. 16 5
      ports/posix/qf_port.c
  34. 16 5
      ports/win32-qv/qf_port.c
  35. 16 5
      ports/win32/qf_port.c
  36. 10 4
      source/qep_hsm.c
  37. 8 2
      source/qep_msm.c
  38. 32 5
      source/qf_defer.c
  39. 17 11
      source/qf_time.c

+ 3 - 1
doxygen/Doxyfile

@@ -108,6 +108,7 @@ WARN_LOGFILE           =
 INPUT                  = \
     main.cc \
     struct.cc \
+    srs.cc \
     modules.cc \
     qs.cc \
     exa.cc \
@@ -127,7 +128,8 @@ INPUT                  = \
     ../source \
     ../ports/lint \
     ../ports/lint/qk \
-    ../ports/lint/qv
+    ../ports/lint/qv \
+    ../ports/lint/qxk
 
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = \

+ 2 - 1
doxygen/Doxyfile-CHM

@@ -127,7 +127,8 @@ INPUT                  = \
     ../source \
     ../ports/lint \
     ../ports/lint/qk \
-    ../ports/lint/qv
+    ../ports/lint/qv \
+    ../ports/lint/qxk
 
 INPUT_ENCODING         = UTF-8
 FILE_PATTERNS          = \

+ 360 - 0
doxygen/Doxyfile-DOC

@@ -0,0 +1,360 @@
+# Doxyfile 1.8.10
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+DOXYFILE_ENCODING      = UTF-8
+PROJECT_NAME           = "QP/C"
+PROJECT_NUMBER         = "5.6.1"
+PROJECT_BRIEF          =
+PROJECT_LOGO           = images/header_logo_ql.png
+OUTPUT_DIRECTORY       =
+CREATE_SUBDIRS         = NO
+ALLOW_UNICODE_NAMES    = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       =
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        =
+STRIP_FROM_INC_PATH    =
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+QT_AUTOBRIEF           = YES
+MULTILINE_CPP_IS_BRIEF = YES
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 4
+ALIASES += next{1}="<hr><b>Next:</b> @ref \1</p>"
+ALIASES += description="@par <b>Description</b>@n"
+ALIASES += hint="@par <b>Hint</b>@n"
+ALIASES += usage="@par <b>Usage</b>@n"
+ALIASES += reqdef{2}="<div class="vmargin20"></div>@anchor \1 <TABLE><TR ALIGN="left"><TH NOWRAP>\1</TH><TH WIDTH="100%">\2</TH></TR></TABLE>"
+ALIASES += reqref{1}="@ref \1 \"\1\""
+ALIASES += termdef{2}="@anchor term_\1 @par \2"
+ALIASES += termref{2}="@ref term_\1 \"\2\""
+
+TCL_SUBST              =
+OPTIMIZE_OUTPUT_FOR_C  = YES
+OPTIMIZE_OUTPUT_JAVA   = NO
+OPTIMIZE_FOR_FORTRAN   = NO
+OPTIMIZE_OUTPUT_VHDL   = NO
+EXTENSION_MAPPING      =
+MARKDOWN_SUPPORT       = YES
+AUTOLINK_SUPPORT       = YES
+BUILTIN_STL_SUPPORT    = NO
+CPP_CLI_SUPPORT        = NO
+SIP_SUPPORT            = NO
+IDL_PROPERTY_SUPPORT   = YES
+DISTRIBUTE_GROUP_DOC   = NO
+GROUP_NESTED_COMPOUNDS = NO
+SUBGROUPING            = YES
+INLINE_GROUPED_CLASSES = YES
+INLINE_SIMPLE_STRUCTS  = YES
+TYPEDEF_HIDES_STRUCT   = YES
+LOOKUP_CACHE_SIZE      = 0
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = NO
+EXTRACT_PRIVATE        = NO
+EXTRACT_PACKAGE        = NO
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+EXTRACT_ANON_NSPACES   = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = NO
+HIDE_SCOPE_NAMES       = NO
+HIDE_COMPOUND_REFERENCE= NO
+SHOW_INCLUDE_FILES     = YES
+SHOW_GROUPED_MEMB_INC  = NO
+FORCE_LOCAL_INCLUDES   = NO
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_MEMBERS_CTORS_1ST = NO
+SORT_GROUP_NAMES       = NO
+SORT_BY_SCOPE_NAME     = NO
+STRICT_PROTO_MATCHING  = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       =
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_FILES             = YES
+SHOW_NAMESPACES        = YES
+FILE_VERSION_FILTER    =
+LAYOUT_FILE            =
+CITE_BIB_FILES         =
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           =
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = \
+    main.cc \
+    struct.cc \
+    srs.cc \
+    modules.cc \
+    qs.cc \
+    exa.cc \
+    exa_apps.cc \
+    exa_native.cc \
+    exa_rtos.cc \
+    exa_os.cc \
+    exa_mware.cc \
+    ports.cc \
+    ports_native.cc \
+    ports_rtos.cc \
+    ports_os.cc \
+    history.cc \
+    macros.h \
+    metrics.cc
+
+INPUT_ENCODING         = UTF-8
+FILE_PATTERNS          = \
+    *.cc \
+    *.h \
+    *.c \
+    *.cpp \
+    *.s \
+    *.asm
+
+RECURSIVE              = YES
+EXCLUDE                = \
+    ../include/qs_dummy.h \
+    ../ports/lint/MISRA_Exemplar_Suite_test
+
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       =
+EXCLUDE_SYMBOLS        = \
+    QP_IMPL
+
+EXAMPLE_PATH           = \
+    snippets \
+    ../include \
+    ../source \
+    ../ports \
+    ../examples
+
+EXAMPLE_PATTERNS       =
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = images
+INPUT_FILTER           =
+FILTER_PATTERNS        =
+FILTER_SOURCE_FILES    = NO
+FILTER_SOURCE_PATTERNS =
+USE_MDFILE_AS_MAINPAGE =
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = YES
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = NO
+REFERENCES_RELATION    = NO
+REFERENCES_LINK_SOURCE = YES
+SOURCE_TOOLTIPS        = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          =
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = ../../html/qpc
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            = header.html
+HTML_FOOTER            = footer.html
+HTML_STYLESHEET        =
+HTML_EXTRA_STYLESHEET  = ql.css
+HTML_EXTRA_FILES       =
+HTML_COLORSTYLE_HUE    = 220
+HTML_COLORSTYLE_SAT    = 100
+HTML_COLORSTYLE_GAMMA  = 80
+HTML_TIMESTAMP         = NO
+HTML_DYNAMIC_SECTIONS  = NO
+HTML_INDEX_NUM_ENTRIES = 100
+GENERATE_DOCSET        = NO
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+DOCSET_BUNDLE_ID       = com.state-machine.doc
+DOCSET_PUBLISHER_ID    = com.state-machine.doc
+DOCSET_PUBLISHER_NAME  = Quantum Leaps
+GENERATE_HTMLHELP      = NO
+CHM_FILE               = ../../../html/qpc.chm
+HHC_LOCATION           =
+GENERATE_CHI           = NO
+CHM_INDEX_ENCODING     =
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+GENERATE_QHP           = NO
+QCH_FILE               =
+QHP_NAMESPACE          = com.state-machine.qp
+QHP_VIRTUAL_FOLDER     = doc
+QHP_CUST_FILTER_NAME   =
+QHP_CUST_FILTER_ATTRS  =
+QHP_SECT_FILTER_ATTRS  =
+QHG_LOCATION           =
+GENERATE_ECLIPSEHELP   = NO
+ECLIPSE_DOC_ID         = com.state-machine.qp
+DISABLE_INDEX          = YES
+GENERATE_TREEVIEW      = YES
+ENUM_VALUES_PER_LINE   = 4
+TREEVIEW_WIDTH         = 180
+EXT_LINKS_IN_WINDOW    = NO
+FORMULA_FONTSIZE       = 10
+FORMULA_TRANSPARENT    = YES
+USE_MATHJAX            = NO
+MATHJAX_FORMAT         = HTML-CSS
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_EXTENSIONS     =
+MATHJAX_CODEFILE       =
+SEARCHENGINE           = YES
+SERVER_BASED_SEARCH    = NO
+EXTERNAL_SEARCH        = NO
+SEARCHENGINE_URL       =
+SEARCHDATA_FILE        = searchdata.xml
+EXTERNAL_SEARCH_ID     =
+EXTRA_SEARCH_MAPPINGS  =
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = letter
+EXTRA_PACKAGES         =
+LATEX_HEADER           =
+LATEX_FOOTER           =
+LATEX_EXTRA_STYLESHEET =
+LATEX_EXTRA_FILES      =
+PDF_HYPERLINKS         = YES
+USE_PDFLATEX           = YES
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+LATEX_SOURCE_CODE      = NO
+LATEX_BIB_STYLE        = plain
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    =
+RTF_EXTENSIONS_FILE    =
+RTF_SOURCE_CODE        = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_SUBDIR             =
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+GENERATE_DOCBOOK       = NO
+DOCBOOK_OUTPUT         = docbook
+DOCBOOK_PROGRAMLISTING = NO
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           =
+INCLUDE_FILE_PATTERNS  =
+PREDEFINED             = Q_SPY
+EXPAND_AS_DEFINED      =
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+TAGFILES               =
+GENERATE_TAGFILE       =
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+EXTERNAL_PAGES         = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+MSCGEN_PATH            =
+DIA_PATH               =
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+DOT_NUM_THREADS        = 0
+DOT_FONTNAME           = Helvetica
+DOT_FONTSIZE           = 10
+DOT_FONTPATH           =
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = YES
+UML_LIMIT_NUM_FIELDS   = 10
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+INTERACTIVE_SVG        = NO
+DOT_PATH               =
+DOTFILE_DIRS           =
+MSCFILE_DIRS           =
+DIAFILE_DIRS           =
+PLANTUML_JAR_PATH      =
+PLANTUML_INCLUDE_PATH  =
+DOT_GRAPH_MAX_NODES    = 50
+MAX_DOT_GRAPH_DEPTH    = 0
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES

+ 2 - 2
doxygen/history.cc

@@ -256,7 +256,7 @@ This release fixes the following bugs:
 
 Additionally, this release improves the uC/OS-II port in that it is now generic and applicable for any CPU, for which uC/OS-II port exists. Specifically, all references to DOS or x86 have been removed from the QP port and any CPU-specific dependencies have been placed in the separate part of the port.
 
-Finally, this release improves the "QP/C Reference Manual" generated by Doxygen and available both inside the QP/C baseline distribution (qpc.chm file) and online at: http://www.state-machine.com/qp/qpc  
+Finally, this release improves the "QP/C Reference Manual" generated by Doxygen and available both inside the QP/C baseline distribution (qpc.chm file) and online at: http://www.state-machine.com/qpc  
 
 
 ------------------------------------------------------------------------------
@@ -399,7 +399,7 @@ to 15 by breaking up the QHsm_dispatch_() function. The code metrics
 report, including cyclomatic complexity by function as well as other
 standard code metrics (e.g., lines of code), is now included in the
 "QP/C Reference Manual", see
-http://www.state-machine.com/qp/qpc/metrics.html
+http://www.state-machine.com/qpc/metrics.html
 
 Also, in this release all internal QP data that were previously
 uninitialized are now explicitly initialized to zero. In other words,

+ 0 - 0
doxygen/img/file_source_c.png → doxygen/img/file_c.png


+ 0 - 0
doxygen/img/file_source_cpp.png → doxygen/img/file_cpp.png


BIN
doxygen/img/file_h.png


BIN
doxygen/img/file_tcl.png


BIN
doxygen/img/file_wish.png


+ 5 - 3
doxygen/img/img.htm

@@ -18,9 +18,11 @@
 <img src="extern.png">
 <img src="file.png">
 <img src="file_doc.png">
-<img src="file_header.png">
-<img src="file_source_c.png">
-<img src="file_source_cpp.png">
+<img src="file_h.png">
+<img src="file_c.png">
+<img src="file_cpp.png">
+<img src="file_tcl.png">
+<img src="file_wish.png">
 <img src="folder.png">
 <img src="forbidden.png">
 <img src="header_bg.png">

+ 3 - 3
doxygen/main.cc

@@ -3,11 +3,11 @@
 @tableofcontents
 
 @htmlonly
-<img style="float:right; margin:0 8px 8px 15px; clear:right;" src="img/logo_qp.jpg" title="QP">
+<img style="float:right; margin:10px 8px 8px 15px; clear:right;" src="img/logo_qp.jpg" title="QP">
 @endhtmlonly
 
 @section about About QP/C
-<p><a class="extern" target="_blank" href="http://www.state-machine.com/products/"><strong>QP/C&trade; (Quantum Platform in C)</strong></a> is a lightweight, open source <a class="extern" target="_blank" href="http://www.state-machine.com/doc/concepts.html#Framework">active object (actor) framework</a> for building responsive and modular real-time embedded applications as systems of cooperating, event-driven <a class="extern" target="_blank" href="http://www.state-machine.com/doc/concepts.html#Active">active objects</a> (<a href="http://en.wikipedia.org/wiki/Actor_model">actors</a>). The QP/C&trade; framework is a member of a larger family consisting of QP/C, <a href="http://www.state-machine.com/qpcpp" target="_blank" class="extern">QP/C++</a>, and <a href="http://www.state-machine.com/qpcn" target="_blank" class="extern">QP-nano</a> frameworks, which are all strictly quality controlled, thoroughly documented, and <a href="http://www.state-machine.com/licensing" target="_blank" class="extern">commercially licensable</a>.
+<p><a class="extern" target="_blank" href="http://www.state-machine.com/products/"><strong>QP/C&trade; (Quantum Platform in C)</strong></a> is a lightweight, open source <a class="extern" target="_blank" href="http://www.state-machine.com/doc/concepts.html#Framework">active object (actor) framework</a> for building responsive and modular real-time embedded applications as systems of cooperating, event-driven <a class="extern" target="_blank" href="http://www.state-machine.com/doc/concepts.html#Active">active objects</a> (<a href="http://en.wikipedia.org/wiki/Actor_model">actors</a>). The QP/C&trade; framework is a member of a larger family consisting of QP/C, <a href="http://www.state-machine.com/qpcpp" target="_blank" class="extern">QP/C++</a>, and <a href="http://www.state-machine.com/qpn" target="_blank" class="extern">QP-nano</a> frameworks, which are all strictly quality controlled, thoroughly documented, and <a href="http://www.state-machine.com/licensing" target="_blank" class="extern">commercially licensable</a>.
 </p>
 
 All QP&trade; frameworks can run on @ref exa_native "bare-metal single-chip microcontrollers", completely replacing a traditional Real-Time Operating System (RTOS). The frameworks contain a selection of built-in real-time kernels, such as the cooperative @ref comp_qv "QV kernel", the preemptive non-blocking @ref comp_qk "QK kernel", and the preemptive, blocking @ref comp_qxk "QXK kernel", <span class="highlight">which provides all the features you might expect from a traditional <strong>RTOS kernel</strong></span>. @ref ports_native "Native QP ports" and ready-to-use @ref exa_native "examples" are provided for major @ref exa_ref_mcu "CPU families".
@@ -22,7 +22,7 @@ The QP frameworks are used in <a href="http://www.state-machine.com/about/custom
 
 ------------------------------------------------------------------------------
 @section start Downloading and Installing QP/C
-QP/C is available for download from <a class="extern" target="_blank" href="http://sourceforge.net/projects/qpc/files/QP-C">SourceForge.net</a>--the world's biggest open source repository. The summary of available downloads is also available from <a class="extern" target="_blank" href="http://www.state-machine.com/downloads">Quantum Leaps download page</a>. 
+QP/C is available for download from <a class="extern" target="_blank" href="http://sourceforge.net/projects/qpc/files/QP-C">SourceForge.net</a>--the world's biggest open source repository. The summary of available downloads is also available from the <a class="extern" target="_blank" href="http://www.state-machine.com/downloads">Quantum Leaps download page</a>. 
 
 The Quantum Leaps Application Note <a class="extern" target="_blank" href="http://www.state-machine.com/doc/AN_Getting_Started_with_QPC.pdf"><strong>Getting Started with QP/C</strong></a> provides step-by-step instructions on how to download, install, and get started with QP/C quickly.
 

+ 43 - 42
doxygen/metrics.cc

@@ -9,7 +9,7 @@
   License Type: Windows Single User License
   Licensed To : Quantum Leaps, LLC
   License No. : WS2975                          License Date: Dec 15, 2013
-  Build Date  : Sep  2 2009                         Run Date: Dec 31, 2015
+  Build Date  : Sep  2 2009                         Run Date: Jan 23, 2016
   (C)1996-2009 M Squared Technologies LLC
   ________________________________________________________________________
 
@@ -251,8 +251,9 @@
       Function Base           : 1
       Loops while / do        : 1     
       Conditional if / else if: 1     
-  Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 16       eLOC 13       lLOC 9        Comment 21       Lines       21
+      Logical and ( && )      : 1     
+  Complexity   Param 2       Return 1      Cyclo Vg 4       Total        7
+  LOC 17       eLOC 14       lLOC 9        Comment 23       Lines       24
 
   Function: QHsm_childState
   Parameters: (QHsm * const me, QStateHandler const parent)
@@ -261,33 +262,33 @@
       Loops while / do        : 1     
       Conditional if / else if: 1     
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 19       eLOC 15       lLOC 12       Comment 28       Lines       25
+  LOC 20       eLOC 16       lLOC 13       Comment 29       Lines       28
 
   ------------------------------------------------------------------------
 
                           ~~ Total File Summary ~~
 
-  LOC 343      eLOC 296      lLOC 176      Comment 319      Lines      629
+  LOC 345      eLOC 298      lLOC 177      Comment 322      Lines      635
   ------------------------------------------------------------------------
 
                         ~~ File Functional Summary ~~
 
   File Function Count....:          7
-  Total Function LOC.....:        301  Total Function Pts LOC :        2.7
-  Total Function eLOC....:        256  Total Function Pts eLOC:        2.3
-  Total Function lLOC....:        169  Total Function Pts lLOC:        1.4
+  Total Function LOC.....:        303  Total Function Pts LOC :        2.7
+  Total Function eLOC....:        258  Total Function Pts eLOC:        2.3
+  Total Function lLOC....:        170  Total Function Pts lLOC:        1.4
   Total Function Params .:         14  Total Function Return .:          7
-  Total Cyclo Complexity :         42  Total Function Complex.:         63
+  Total Cyclo Complexity :         43  Total Function Complex.:         64
          ------     -----     -----     ------     ------     -----       
-  Max Function LOC ......:        105  Average Function LOC ..:      43.00
-  Max Function eLOC .....:         94  Average Function eLOC .:      36.57
-  Max Function lLOC .....:         62  Average Function lLOC .:      24.14
+  Max Function LOC ......:        105  Average Function LOC ..:      43.29
+  Max Function eLOC .....:         94  Average Function eLOC .:      36.86
+  Max Function lLOC .....:         62  Average Function lLOC .:      24.29
          ------     -----     -----     ------     ------     -----       
   Max Function Parameters:          2  Avg Function Parameters:       2.00
   Max Function Returns ..:          1  Avg Function Returns ..:       1.00
   Max Interface Complex. :          3  Avg Interface Complex. :       3.00
-  Max Cyclomatic Complex.:         15  Avg Cyclomatic Complex.:       6.00
-  Max Total Complexity ..:         18  Avg Total Complexity ..:       9.00
+  Max Cyclomatic Complex.:         15  Avg Cyclomatic Complex.:       6.14
+  Max Total Complexity ..:         18  Avg Total Complexity ..:       9.14
   ________________________________________________________________________
   End of File: ..\source\qep_hsm.c
 
@@ -354,7 +355,7 @@
       Loops for / foreach     : 1     
       Conditional if / else if: 1     
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 11       eLOC 8        lLOC 6        Comment 16       Lines       12
+  LOC 12       eLOC 9        lLOC 7        Comment 17       Lines       15
 
   Function: QMsm_childStateObj
   Parameters: (QMsm const * const me, QMState const * const parent)
@@ -363,27 +364,27 @@
       Loops for / foreach     : 1     
       Conditional if / else if: 1     
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 19       eLOC 13       lLOC 9        Comment 18       Lines       23
+  LOC 20       eLOC 14       lLOC 10       Comment 19       Lines       26
 
   ------------------------------------------------------------------------
 
                           ~~ Total File Summary ~~
 
-  LOC 310      eLOC 256      lLOC 142      Comment 282      Lines      568
+  LOC 312      eLOC 258      lLOC 144      Comment 284      Lines      574
   ------------------------------------------------------------------------
 
                         ~~ File Functional Summary ~~
 
   File Function Count....:          8
-  Total Function LOC.....:        283  Total Function Pts LOC :        2.4
-  Total Function eLOC....:        231  Total Function Pts eLOC:        2.0
-  Total Function lLOC....:        137  Total Function Pts lLOC:        1.1
+  Total Function LOC.....:        285  Total Function Pts LOC :        2.4
+  Total Function eLOC....:        233  Total Function Pts eLOC:        2.0
+  Total Function lLOC....:        139  Total Function Pts lLOC:        1.1
   Total Function Params .:         17  Total Function Return .:          8
   Total Cyclo Complexity :         44  Total Function Complex.:         69
          ------     -----     -----     ------     ------     -----       
-  Max Function LOC ......:        107  Average Function LOC ..:      35.38
-  Max Function eLOC .....:         91  Average Function eLOC .:      28.88
-  Max Function lLOC .....:         56  Average Function lLOC .:      17.13
+  Max Function LOC ......:        107  Average Function LOC ..:      35.63
+  Max Function eLOC .....:         91  Average Function eLOC .:      29.13
+  Max Function lLOC .....:         56  Average Function lLOC .:      17.38
          ------     -----     -----     ------     ------     -----       
   Max Function Parameters:          3  Avg Function Parameters:       2.13
   Max Function Returns ..:          1  Avg Function Returns ..:       1.00
@@ -1949,9 +1950,9 @@
 
                          ~~ Total Project Summary ~~
 
-  LOC 5150     eLOC 4616     lLOC 2203     Comment 7079     Lines    12458
+  LOC 5154     eLOC 4620     lLOC 2206     Comment 7084     Lines    12470
   Average per File, metric/41 files
-  LOC 125      eLOC 112      lLOC 53       Comment 172      Lines      303
+  LOC 125      eLOC 112      lLOC 53       Comment 172      Lines      304
 
   ------------------------------------------------------------------------
 
@@ -1984,13 +1985,13 @@
 
   Function: QHsm_isIn
   Parameters: (QHsm * const me, QStateHandler const state)
-  Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 16       eLOC 13       lLOC 9        Comment 21       Lines       21
+  Complexity   Param 2       Return 1      Cyclo Vg 4       Total        7
+  LOC 17       eLOC 14       lLOC 9        Comment 23       Lines       24
 
   Function: QHsm_childState
   Parameters: (QHsm * const me, QStateHandler const parent)
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 19       eLOC 15       lLOC 12       Comment 28       Lines       25
+  LOC 20       eLOC 16       lLOC 13       Comment 29       Lines       28
 
   Function: QMsm_ctor
   Parameters: (QMsm * const me, QStateHandler initial)
@@ -2026,12 +2027,12 @@
   Function: QMsm_isInState
   Parameters: (QMsm * const me, QMState const * const state)
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 11       eLOC 8        lLOC 6        Comment 16       Lines       12
+  LOC 12       eLOC 9        lLOC 7        Comment 17       Lines       15
 
   Function: QMsm_childStateObj
   Parameters: (QMsm const * const me, QMState const * const parent)
   Complexity   Param 2       Return 1      Cyclo Vg 3       Total        6
-  LOC 19       eLOC 13       lLOC 9        Comment 18       Lines       23
+  LOC 20       eLOC 14       lLOC 10       Comment 19       Lines       26
 
   Function: QF_add_
   Parameters: (QMActive * const a)
@@ -2634,26 +2635,26 @@
   LOC 54       eLOC 46       lLOC 33       Comment 25       Lines       70
 
   Total: Functions  
-  LOC 3064     eLOC 2562     lLOC 1691     InCmp 345      CycloCmp     486
-  Function Points         FP(LOC) 23.9    FP(eLOC) 20.0   FP(lLOC)    13.2
+  LOC 3068     eLOC 2566     lLOC 1694     InCmp 345      CycloCmp     487
+  Function Points         FP(LOC) 24.0    FP(eLOC) 20.0   FP(lLOC)    13.2
 
   ------------------------------------------------------------------------
 
                       ~~ Project Functional Analysis ~~
 
-  Total Functions .......:        131  Total Physical Lines ..:       4058
-  Total LOC .............:       3064  Total Function Pts LOC :       23.9
-  Total eLOC ............:       2562  Total Function Pts eLOC:       20.0
-  Total lLOC.............:       1691  Total Function Pts lLOC:       13.2
-  Total Cyclomatic Comp. :        486  Total Interface Comp. .:        345
+  Total Functions .......:        131  Total Physical Lines ..:       4070
+  Total LOC .............:       3068  Total Function Pts LOC :       24.0
+  Total eLOC ............:       2566  Total Function Pts eLOC:       20.0
+  Total lLOC.............:       1694  Total Function Pts lLOC:       13.2
+  Total Cyclomatic Comp. :        487  Total Interface Comp. .:        345
   Total Parameters ......:        214  Total Return Points ...:        131
-  Total Comment Lines ...:       2679  Total Blank Lines .....:        528
+  Total Comment Lines ...:       2684  Total Blank Lines .....:        531
          ------     -----     -----     ------     ------     -----       
-  Avg Physical Lines ....:      30.98
-  Avg LOC ...............:      23.39  Avg eLOC ..............:      19.56
-  Avg lLOC ..............:      12.91  Avg Cyclomatic Comp. ..:       3.71
+  Avg Physical Lines ....:      31.07
+  Avg LOC ...............:      23.42  Avg eLOC ..............:      19.59
+  Avg lLOC ..............:      12.93  Avg Cyclomatic Comp. ..:       3.72
   Avg Interface Comp. ...:       2.63  Avg Parameters ........:       1.63
-  Avg Return Points .....:       1.00  Avg Comment Lines .....:      20.45
+  Avg Return Points .....:       1.00  Avg Comment Lines .....:      20.49
          ------     -----     -----     ------     ------     -----       
   Max LOC ...............:        254
   Max eLOC ..............:        197  Max lLOC ..............:        125

+ 24 - 14
doxygen/ql.css

@@ -12,6 +12,13 @@ div.toc {
     padding: 10px 10px;
     margin: 0 10px 10px 10px;
 }
+
+hr {
+    height: 0px;
+    border: none;
+    border-top: 2px solid #4A6AAA;
+    margin-top: 25px;
+}
 
 /* QL additions ---------------------------------------------- */
 /*
@@ -78,7 +85,7 @@ table.indextable ul {
 }
 table.indextable ul {padding-left:8px;}
 
-.highlight    {background-color:#ffff33; }
+.highlight    {background-color:#EEEE77; }
 .menu         {background-color:#dddddd; }
 .underline    {text-decoration:underline; }
 .strong       {background-color:#ffff33; font-weight:bold; }
@@ -87,9 +94,12 @@ table.indextable ul {padding-left:8px;}
 .string, span.char { color: darkgreen; }
 .separate {
     border: none;
-    border-top: 1px #bfbfbf solid;
-    width: 300px;
-}
+    border-top: 1px #dedede solid;
+    margin-top: 20px;
+    /*width: 300px;*/
+}
+.vmargin10    {margin-top: 10px;}
+.vmargin20    {margin-top: 20px;}
 .button {
     border-style: solid;
     border-color: white #625f5d #625f5d #eeeeee;
@@ -162,22 +172,22 @@ dl.note {
     padding: 5px 15px 10px 15px;
     background-color: #FFFFEE;
     border: 1px solid #EEEE77;
-    border-radius: 7px 7px 7px 7px;
+    /*border-radius: 7px 7px 7px 7px;*/
+    border-radius: 0;
 }
-
 dl.attention {
     margin: 0px 10px 0px 0px;
     padding: 5px 15px 10px 15px;
     background-color: #FFCC00;
     border: 1px solid #CCA300;
-    border-radius: 7px 7px 7px 7px;
+    border-radius: 0;
 }
 dl.remark {
     margin: 0px 10px 0px 0px;
     padding: 10px 15px 10px 15px;
-    background-color: #E6E6E6;
-    border: 1px solid #B2B2B2;
-    border-radius: 7px 7px 7px 7px;
+    background-color: #EEEEFF;
+    border: 1px solid #CCCCFF;
+    border-radius: 0;
 }
 
 ul.tag {list-style-type:none;}
@@ -218,8 +228,8 @@ div.toc {
 .file          {background:url(img/file.png)          no-repeat;}
 .file_doc      {background:url(img/file_doc.png)      no-repeat;}
 .file_h        {background:url(img/file_header.png)   no-repeat;}
-.file_c        {background:url(img/file_source_c.png) no-repeat;}
-.file_cpp      {background:url(img/file_source_cpp.png) no-repeat;}
-.file_ino      {background:url(img/file_source_ino.png) no-repeat;}
-.file_tcl      {background:url(img/file_source_tcl.png) no-repeat;}
+.file_c        {background:url(img/file_c.png)        no-repeat;}
+.file_cpp      {background:url(img/file_cpp.png)      no-repeat;}
+.file_tcl      {background:url(img/file_tcl.png)      no-repeat;}
+.file_wish     {background:url(img/file_wish.png)     no-repeat;}
 .file_mak      {background:url(img/file_make.png)     no-repeat;}

+ 175 - 0
doxygen/srs.cc

@@ -0,0 +1,175 @@
+/*! @page srs_toc Specification
+
+<h1>Software Requirements Specification (SRS)</h1>
+<p>This document specifies the requirements for the **QP/C active object framework**. This document describes the intended features of the QP/C framework, as well as the interfaces to other software, hardware, and various other technical dependencies. The quick links to the main sections of this SRS are given below:
+</p>
+
+- @subpage srs_intro
+  + @ref srs_purpose
+  + @ref srs_conv
+  + @ref srs_scope
+  + @ref srs_audience
+  + @ref srs_refs
+- @subpage srs_descr
+  + @ref srs_prod
+  + @ref srs_funct
+  + @ref srs_user
+  + @ref srs_assume
+- @subpage srs
+  + @ref srs_fun
+    - @ref srs_qf
+    - @ref srs_qep
+    - @ref srs_qv
+    - @ref srs_qk
+    - @ref srs_qxk
+  + @ref srs_non-fun
+  + @ref srs_constr
+- @subpage glossary
+
+@note
+This SRS document is included as an integral part of the "QP/C Reference Manual" for bi-directional @termref{traceabilty, traceabilty} of the requirements to and from the design, the code, and the tests. Specifically, the electronic format of all these documents enables creating *hyper-links*, so it possible, for example, to simply click on a hyper-link to a requirement to get to its description.
+
+@next{srs_intro}
+*/
+/*##########################################################################*/
+/*! @page srs_intro Introduction
+
+@section srs_purpose Purpose
+<strong>QP/C</strong> (Quantum Platform in C) is a lightweight software @termref{framework, framework} for building responsive and modular real-time embedded applications as systems of cooperating, event-driven  @termref{ao, active objects} (@termref{ao, actors}).
+
+
+------------------------------------------------------------------------------
+@section srs_conv Document Conventions
+
+<div class="separate"></div>
+@subsection srs_conv_num Numbering of Requirements
+
+
+<div class="separate"></div>
+@subsection srs_conv_shall Use of "Shall" and "Should"
+Requirement definitions use consistent terminology to indicate whether something is mandatory or desirable. _Shall_ is used to denote **mandatory** behavior. _Should_ is used to denote a **desirable** behavior that should typically take place, but might not happen all the time or might be optional in uncommon cases.
+
+
+------------------------------------------------------------------------------
+@section srs_scope Project Scope
+
+
+------------------------------------------------------------------------------
+@section srs_audience Intended Audience
+
+This SRS document is primarily intended for **embedded software engineers**, who develop applications based on the QP/C framework.
+
+This SRS can be also of interest to test engineers, software architects, system engineers, quality-assurance engineers, hardware engineers, as well as managers overseeing the software development.
+
+
+------------------------------------------------------------------------------
+@section srs_refs References
+
+
+
+@next{srs_descr}
+*/
+/*##########################################################################*/
+/*! @page srs_descr Overall Description
+
+------------------------------------------------------------------------------
+@section srs_prod Product Perspective
+
+
+------------------------------------------------------------------------------
+@section srs_funct Product Functions
+
+- @reqref{RQPC101}
+- @reqref{RQPC102}
+
+
+------------------------------------------------------------------------------
+@section srs_user User Characteristics
+The main users of the QP/C framework are **embedded software engineers**, who develop applications based on the QP/C framework.
+
+
+
+------------------------------------------------------------------------------
+@section srs_assume Assumptions and Dependencies
+
+@next{srs}
+*/
+/*##########################################################################*/
+/*! @page srs Requirements
+
+
+------------------------------------------------------------------------------
+@section srs_fun Functional Requirements
+
+<div class="separate"></div>
+@subsection srs_qf Active Object Framework
+The software shall support hierarchical state nesting
+
+<div class="separate"></div>
+@subsection srs_qep State Machine Event Processor
+
+
+@reqdef{RQPC101, The software shall support hierarchical state nesting}
+@par Amplification
+State hierarchy is the primary mechanism of behavioral reuse in state machines.
+@par Rationale
+This is a useful thing to have
+
+@reqdef{RQPC102, The software shall support manual coding}
+
+
+<div class="separate"></div>
+@subsection srs_qv Cooperative Run-to-Completion Kernel
+
+
+<div class="separate"></div>
+@subsection srs_qk Preemptive Run-to-Completion Kernel
+
+
+<div class="separate"></div>
+@subsection srs_qxk Preemptive Blocking Kernel
+
+------------------------------------------------------------------------------
+@section srs_non-fun Non-functional Requirements
+
+<div class="separate"></div>
+@subsection srs_quality Software Quality Attributes
+
+
+<div class="separate"></div>
+@subsection srs_perform Performance Requirements
+
+
+<div class="separate"></div>
+@subsection srs_port Portability Requirements
+
+
+<div class="separate"></div>
+@subsection srs_safe Safety Requirements
+
+
+<div class="separate"></div>
+@subsection srs_secure Security Requirements
+
+
+------------------------------------------------------------------------------
+@section srs_constr Constraints
+
+<div class="separate"></div>
+@subsection srs_standards Compliance with Standards
+
+*/
+/*##########################################################################*/
+/*! @page glossary Glossary
+
+@termdef{ao, active object (actor)}
+Active objects (Actors) are event-driven, strictly encapsulated software objects running in their own threads of control that communicate with one another asynchronously by exchanging events. The UML specification further proposes the UML variant of hierarchical state machines (UML statecharts) with which to model the behavior of event-driven active objects.
+
+
+@termdef{framework, framework}
+A software framework is a universal, reusable software architecture for development of specific class of software (e.g., real-time embedded control systems). A framework typically provides a set of abstract classes and defines their responsibilities and collaborations. Developers customize a framework to a particular software application by subclassing and composing the framework classes. The most important characteristics of this process is that code provided by the application developers is being called by the framework, which results in **inversion of control** compared to using a library such as a traditional operating system.
+
+@termdef{traceabilty, traceabilty}
+Traceability is the ability to verify the history, location, or application of an item by means of documented recorded identification.
+
+*/

+ 15 - 5
doxygen/struct.cc

@@ -2,10 +2,17 @@
 
 @tableofcontents
 
-@section event_driven Event-Driven Programming
-Virtually all embedded systems are **event-driven** by nature, which means that they continuously wait for the occurrence of some internal or external event such as a time tick, an arrival of some data, a button press, or a touch on a touch-screen. After recognizing the event, such systems *react* by performing the appropriate computation that may include manipulating the hardware or generating "soft" events that trigger other internal software components. Once the event-handling is complete, the software goes back to waiting for the next event.
+<p>Virtually all embedded systems are **event-driven** by nature, which means that their main job is to *react to events*, such as button presses, touches on a screen, time ticks, or arrivals of some data packets. Consequently, most of the time, an embedded system is waiting for events, and only affter recognizing an event, the system *reacts* by performing the appropriate computation that may include manipulating the hardware or generating "soft" events that trigger other internal software components. Once the event-handling is complete, the software goes back to waiting for the next event.
+</p>
+
+
+------------------------------------------------------------------------------
+@section paradigm Embedded Programming Paradigms
 
-However, most embedded systems are traditionally programmed in a **sequential** manner, where a program waits for *specific* events in various places in its execution path by either busy-polling or blocking on semaphore or other such mechanism of a traditional Real-Time Operating System (RTOS). Example of the basic sequential code is the traditional "Blinky" implementation:
+
+<div class="separate"></div>
+@subsection sequential Traditional Sequential Programming
+In spite of the fundamental event-driven nature, most embedded systems are traditionally programmed in a **sequential** manner, where a program waits for *specific* events in various places in its execution path by either busy-polling or blocking on semaphore or other such mechanism of a traditional Real-Time Operating System (RTOS). Example of the basic sequential code is the traditional "Blinky" implementation:
 
 @code{.c}
 while (1) { /* RTOS task or a "superloop" */
@@ -18,6 +25,9 @@ while (1) { /* RTOS task or a "superloop" */
 
 Although this approach is functional in many situations, it does not work very well when there are multiple possible events whose arrival times and order you cannot predict and where it is important to handle the events in a timely manner. The fundamental problem is that while a sequential program is waiting for one kind of event (e.g., elapsing of a time interval) it is not doing anything else and is **not responsive** to other events (e.g., a button press).
 
+
+<div class="separate"></div>
+@subsection event_driven Event-Driven Programming
 For this and other reasons experienced developers turn to the long-known design strategy called **event-driven programming**, which requires a distinctly different way of thinking than conventional sequential programs. All event-driven programs are naturally divided into the application, which actually handles the events, and the supervisory event-driven infrastructure (**framework**), which waits for events and dispatches them to the application. The control resides in the event-driven framework, so from the application standpoint, the control is *inverted* compared to a traditional sequential program.
 
 The **QP/C framework** brings together two most effective techniques of structuring event-driven embedded systems: <a href="http://www.state-machine.com/doc/concepts.html#Active" target="_blank" class="extern">active objects</a> and <a href="http://www.state-machine.com/doc/concepts.html#HSM" target="_blank" class="extern">hierarchical state machines</a> (UML statecharts). The following sections describe the main components and structure of the framework.
@@ -118,7 +128,7 @@ The figure below shows the main classes comprising the QP/C framework and their
 ------------------------------------------------------------------------------
 @section sm State Machines
 
-The behavior of each active object in QP/C is specified by means of a **hierarchical state machine** (UML statechart), which is the most effective and elegant technique of decomposing event-driven behavior. The most important innovation of UML state machines over classical finite state machines (FSMs) is the hierarchical state nesting. The value of state nesting lies in avoiding repetitions, which are inevitable in the traditional "flat" FSM formalism and are the main reason for the "state-transition explosion" in FSMs. The semantics of state nesting allow substates to define only the differences of behavior from the superstates, thus promoting sharing and reusing behavior.
+The behavior of each active object in QP/C is specified by means of a <a href="http://www.state-machine.com/doc/concepts.html#HSM" target="_blank" class="extern">hierarchical state machine</a> (UML statechart), which is the most effective and elegant technique of decomposing event-driven behavior. The most important innovation of UML state machines over classical finite state machines (FSMs) is the hierarchical state nesting. The value of state nesting lies in avoiding repetitions, which are inevitable in the traditional "flat" FSM formalism and are the main reason for the "state-transition explosion" in FSMs. The semantics of state nesting allow substates to define only the differences of behavior from the superstates, thus promoting sharing and reusing behavior.
 
 @htmlonly
 <div class="image">
@@ -176,7 +186,7 @@ The MISRA guidelines place great emphasis on the use of static code analysts too
 ------------------------------------------------------------------------------
 @section pc-lint PC-Lint Support
 
-The QP/C framework comes with extensive support for automatic rule checking by means of <a class="extern" target="_blank" href="http://www.gimpel.com/">PC-Lint</a>, which is designed not just for proving compliance of the Q/CP framework code, but more importantly, to aid in checking compliance of the application-level code. Any organization engaged in designing safety-related embedded software could benefit from the unprecedented quality infrastructure built around the QP/C framework.
+The QP/C framework comes with extensive support for automatic rule checking by means of <a class="extern" target="_blank" href="http://www.gimpel.com/">PC-Lint</a>, which is designed not just for proving compliance of the QP/C framework code, but more importantly, to aid in checking compliance of the application-level code. Any organization engaged in designing safety-related embedded software could benefit from the unprecedented quality infrastructure built around the QP/C framework.
 
 @sa @ref lint "Lint Port"
 

+ 110 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.cproject

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.111328568">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.111328568" moduleId="org.eclipse.cdt.core.settings" name="dbg">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.111328568" name="dbg" parent="org.eclipse.cdt.build.core.emptycfg">
+					<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.111328568.191476270" name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.217778515" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
+							<option id="cdt.managedbuild.option.gnu.cross.prefix.990163088" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
+							<option id="cdt.managedbuild.option.gnu.cross.path.474447597" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.1302913591" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+							<builder id="cdt.managedbuild.builder.gnu.cross.2022198838" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1008897929" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1891879512" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1431480356" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.765551273" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.1665130650" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1809395135" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1322341993" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1632023454" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2134338471" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="cdt.managedbuild.toolchain.gnu.cross.base.111328568.1501030115">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.cross.base.111328568.1501030115" moduleId="org.eclipse.cdt.core.settings" name="rel">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration buildProperties="" description="" id="cdt.managedbuild.toolchain.gnu.cross.base.111328568.1501030115" name="rel" parent="org.eclipse.cdt.build.core.emptycfg">
+					<folderInfo id="cdt.managedbuild.toolchain.gnu.cross.base.111328568.1501030115." name="/" resourcePath="">
+						<toolChain id="cdt.managedbuild.toolchain.gnu.cross.base.1422204079" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.base">
+							<option id="cdt.managedbuild.option.gnu.cross.prefix.1145756904" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix"/>
+							<option id="cdt.managedbuild.option.gnu.cross.path.670306032" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path"/>
+							<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.683322462" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
+							<builder arguments="CONF=rel" buildPath="${workspace_loc:/blinky-qk}" command="make" id="cdt.managedbuild.builder.gnu.cross.2029657766" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.304208026" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
+								<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1543920254" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1363619115" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1714988994" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker">
+								<inputType id="cdt.managedbuild.tool.gnu.c.linker.input.62951473" superClass="cdt.managedbuild.tool.gnu.c.linker.input">
+									<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+									<additionalInput kind="additionalinput" paths="$(LIBS)"/>
+								</inputType>
+							</tool>
+							<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1697869873" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1446218864" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
+							<tool id="cdt.managedbuild.tool.gnu.cross.assembler.209670630" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
+								<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1343315008" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="blinky-qk.null.1703756189" name="blinky-qk"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Default">
+			<resource resourceType="PROJECT" workspacePath="/blinky-qk"/>
+		</configuration>
+		<configuration configurationName="rel">
+			<resource resourceType="PROJECT" workspacePath="/blinky-qk"/>
+		</configuration>
+		<configuration configurationName="Debug">
+			<resource resourceType="PROJECT" workspacePath="/blinky-qk"/>
+		</configuration>
+		<configuration configurationName="dbg">
+			<resource resourceType="PROJECT" workspacePath="/blinky-qk"/>
+		</configuration>
+	</storageModule>
+	<storageModule moduleId="null.devicePreference"/>
+	<storageModule moduleId="cpuFamily"/>
+</cproject>

+ 26 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/.project

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>blinky-qk-gnu_ek-tm4c123gxl</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 13 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/targetConfigs/Tiva TM4C123GH6PM.ccxml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<configurations XML_version="1.2" id="configurations_0">
+    <configuration XML_version="1.2" id="configuration_0">
+        <instance XML_version="1.2" desc="Stellaris In-Circuit Debug Interface" href="connections/Stellaris_ICDI_Connection.xml" id="Stellaris In-Circuit Debug Interface" xml="Stellaris_ICDI_Connection.xml" xmlpath="connections"/>
+        <connection XML_version="1.2" id="Stellaris In-Circuit Debug Interface">
+            <instance XML_version="1.2" href="drivers/stellaris_cs_dap.xml" id="drivers" xml="stellaris_cs_dap.xml" xmlpath="drivers"/>
+            <instance XML_version="1.2" href="drivers/stellaris_cortex_m4.xml" id="drivers" xml="stellaris_cortex_m4.xml" xmlpath="drivers"/>
+            <platform XML_version="1.2" id="platform_0">
+                <instance XML_version="1.2" desc="Tiva TM4C123GH6PM" href="devices/tm4c123gh6pm.xml" id="Tiva TM4C123GH6PM" xml="tm4c123gh6pm.xml" xmlpath="devices"/>
+            </platform>
+        </connection>
+    </configuration>
+</configurations>

+ 9 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qk/gnu/targetConfigs/readme.txt

@@ -0,0 +1,9 @@
+The 'targetConfigs' folder contains target-configuration (.ccxml) files, automatically generated based
+on the device and connection settings specified in your project on the Properties > General page.
+
+Please note that in automatic target-configuration management, changes to the project's device and/or
+connection settings will either modify an existing or generate a new target-configuration file. Thus,
+if you manually edit these auto-generated files, you may need to re-apply your changes. Alternatively,
+you may create your own target-configuration file for this project and manage it manually. You can
+always switch back to automatic target-configuration management by checking the "Manage the project's
+target-configuration automatically" checkbox on the project's Properties > General page.

+ 52 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.cproject

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="0.1287664464">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.1287664464" moduleId="org.eclipse.cdt.core.settings" name="Default">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration buildProperties="" description="" id="0.1287664464" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+					<folderInfo id="0.1287664464." name="/" resourcePath="">
+						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.149724679" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.149724679.1978932215" name=""/>
+							<builder id="org.eclipse.cdt.build.core.settings.default.builder.1488624325" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1188355467" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1346309738" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1555534403" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.469282938" name="TI GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.242286875" languageId="com.ti.ccstudio.core.TIGPPLanguage" languageName="TI GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1419719938" name="TI Linker Command" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.394469282" languageId="com.ti.ccstudio.core.TICMDLanguage" languageName="TI Linker Command" sourceContentType="com.ti.common.core.linkerCommandFile,com.ti.common.core.linkerCommandFile2" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1321521029" name="TI GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.887174323" languageId="com.ti.ccstudio.core.TIGCCLanguage" languageName="TI GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="blinky-qv.null.1311192842" name="blinky-qv"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="0.1287664464">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+</cproject>

+ 26 - 0
examples/arm-cm/blinky_ek-tm4c123gxl/qv/gnu/.project

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>blinky-qv</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 80 - 0
examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.code_review_properties

@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Property>
+  <Review id="DEFAULT">
+    <Description>property.default.description</Description>
+    <Author/>
+    <CreationDate format="yyyy-MM-dd :: HH:mm:ss:SSS z">1970-01-01 :: 00:00:00:000 GMT-10:00</CreationDate>
+    <Directory>review</Directory>
+    <Reviewers/>
+    <Files/>
+    <FieldItems>
+      <FieldItem id="Type" default="item.label.unset">
+        <Entry name="item.label.unset" />        
+        <Entry name="item.type.label.codingStandards" />
+        <Entry name="item.type.label.programLogic" />
+        <Entry name="item.type.label.optimization" />
+        <Entry name="item.type.label.usability" />
+        <Entry name="item.type.label.clarity" />
+        <Entry name="item.type.label.missing" />
+        <Entry name="item.type.label.irrelevant" />
+        <Entry name="item.type.label.suggestion" />
+        <Entry name="item.type.label.other" />
+      </FieldItem>
+      <FieldItem id="Severity" default="item.label.unset">
+        <Entry name="item.label.unset" />
+        <Entry name="item.severity.label.critical" />
+        <Entry name="item.severity.label.major" />
+        <Entry name="item.severity.label.normal" />
+        <Entry name="item.severity.label.minor" />
+        <Entry name="item.severity.label.trivial" />
+      </FieldItem>
+      <FieldItem id="Resolution" default="item.label.unset">
+        <Entry name="item.label.unset" />
+        <Entry name="item.resolution.label.validNeedsfixing" />
+        <Entry name="item.resolution.label.validFixlater" />
+        <Entry name="item.resolution.label.validDuplicate" />
+        <Entry name="item.resolution.label.validWontfix" />
+        <Entry name="item.resolution.label.invalidWontfix" />
+        <Entry name="item.resolution.label.unsureValidity" />
+      </FieldItem>
+      <FieldItem id="Status" default="item.status.label.open">
+        <Entry name="item.status.label.open" />
+        <Entry name="item.status.label.resolved" />
+        <Entry name="item.status.label.closed" />
+        <Entry name="item.status.label.reopened" />        
+      </FieldItem>
+    </FieldItems>
+    <Filters>
+      <Phase name="phase.individual" enabled="true">
+        <Filter name="Interval" value="7" enabled="false" />
+        <Filter name="Reviewer" value="item.reviewer.label.automatic" enabled="true" />
+        <Filter name="Type" value="item.label.unset" enabled="false" />
+        <Filter name="Severity" value="item.label.unset" enabled="false" />
+        <Filter name="AssignedTo" value="" enabled="false" />
+        <Filter name="Resolution" value="item.label.unset" enabled="false" />
+        <Filter name="Status" value="item.status.label.open" enabled="false" />
+        <Filter name="File" value="" enabled="false" />
+      </Phase>
+      <Phase name="phase.team" enabled="true">
+        <Filter name="Interval" value="7" enabled="false" />
+        <Filter name="Reviewer" value="" enabled="false" />
+        <Filter name="Type" value="item.label.unset" enabled="false" />
+        <Filter name="Severity" value="item.label.unset" enabled="false" />
+        <Filter name="AssignedTo" value="" enabled="false" />
+        <Filter name="Resolution" value="item.label.unset" enabled="true" />
+        <Filter name="Status" value="item.status.label.open" enabled="false" />
+        <Filter name="File" value="" enabled="false" />
+      </Phase>
+      <Phase name="phase.rework" enabled="true">
+        <Filter name="Interval" value="7" enabled="false" />
+        <Filter name="Reviewer" value="" enabled="false" />
+        <Filter name="Type" value="item.label.unset" enabled="false" />
+        <Filter name="Severity" value="item.label.unset" enabled="false" />
+        <Filter name="AssignedTo" value="item.reviewer.label.automatic" enabled="true" />
+        <Filter name="Resolution" value="item.label.unset" enabled="false" />
+        <Filter name="Status" value="item.status.label.open" enabled="true" />
+        <Filter name="File" value="" enabled="false" />
+      </Phase>
+    </Filters>
+  </Review>
+</Property>

+ 128 - 0
examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.cproject

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+	<storageModule moduleId="org.eclipse.cdt.core.settings">
+		<cconfiguration id="0.702582030">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.702582030" moduleId="org.eclipse.cdt.core.settings" name="Debug">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="dpp-qk_nucleo-l152re" buildProperties="" description="" id="0.702582030" name="Debug" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+					<folderInfo id="0.702582030." name="/" resourcePath="">
+						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1971280569" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1971280569.810004877" name=""/>
+							<builder id="org.eclipse.cdt.build.core.settings.default.builder.974389519" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1328104294" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1304677281" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1668269358" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1370564414" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1461123565" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1821495843" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.2079360930" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="0.702582030.929445009">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.702582030.929445009" moduleId="org.eclipse.cdt.core.settings" name="Spy">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="dpp-qk_nucleo-l152re" buildProperties="" description="" id="0.702582030.929445009" name="Spy" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+					<folderInfo id="0.702582030.929445009." name="/" resourcePath="">
+						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.752313805" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.752313805.137234219" name=""/>
+							<builder arguments="CONF=spy" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.453003165" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1897087854" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.1639894498" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1086982770" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.537091916" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1623698983" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.840726198" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.494492516" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+		<cconfiguration id="0.702582030.2433505">
+			<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.702582030.2433505" moduleId="org.eclipse.cdt.core.settings" name="Release">
+				<externalSettings/>
+				<extensions>
+					<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+					<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+				</extensions>
+			</storageModule>
+			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+				<configuration artifactName="dpp-qk_nucleo-l152re" buildProperties="" description="" id="0.702582030.2433505" name="Release" parent="org.eclipse.cdt.build.core.prefbase.cfg">
+					<folderInfo id="0.702582030.2433505." name="/" resourcePath="">
+						<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.1842247701" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain">
+							<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.1842247701.2005119126" name=""/>
+							<builder arguments="CONF=rel" command="make" id="org.eclipse.cdt.build.core.settings.default.builder.1982053949" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.libs.443716535" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.512931862" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1494628755" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.10144561" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1822879858" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+							<tool id="org.eclipse.cdt.build.core.settings.holder.602576814" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder">
+								<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1535116175" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/>
+							</tool>
+						</toolChain>
+					</folderInfo>
+				</configuration>
+			</storageModule>
+			<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+		</cconfiguration>
+	</storageModule>
+	<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+		<project id="dpp-qk_nucleo-l152re.null.1706081848" name="dpp-qk_nucleo-l152re"/>
+	</storageModule>
+	<storageModule moduleId="scannerConfiguration">
+		<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		<scannerConfigBuildInfo instanceId="0.702582030">
+			<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+		</scannerConfigBuildInfo>
+	</storageModule>
+	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
+	<storageModule moduleId="refreshScope" versionNumber="2">
+		<configuration configurationName="Release">
+			<resource resourceType="PROJECT" workspacePath="/dpp-qk_nucleo-l152re"/>
+		</configuration>
+		<configuration configurationName="Default">
+			<resource resourceType="PROJECT" workspacePath="/dpp-qk_nucleo-l152re"/>
+		</configuration>
+		<configuration configurationName="Spy">
+			<resource resourceType="PROJECT" workspacePath="/dpp-qk_nucleo-l152re"/>
+		</configuration>
+	</storageModule>
+</cproject>

+ 27 - 0
examples/arm-cm/dpp_nucleo-l152re/qk/gnu/.project

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>dpp-qk_nucleo-l152re</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+			<triggers>clean,full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+			<triggers>full,incremental,</triggers>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+	</natures>
+</projectDescription>

+ 3 - 3
examples/msp430/blinky_msp-exp430f5529lp/qk/ccs/.cproject

@@ -92,7 +92,7 @@
 						</toolChain>
 					</folderInfo>
 					<sourceEntries>
-						<entry excluding="QP/qs_rx.c|QP/qs.c|QP/qs_fp.c|QP/qs_64bit.c|QP/qv.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+						<entry excluding="QP/qxk_mutex.c|QP/qxk_sema.c|QP/qxk_xthr.c|QP/qxk.c|QP/qs_rx.c|QP/qs.c|QP/qs_fp.c|QP/qs_64bit.c|QP/qv.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 					</sourceEntries>
 				</configuration>
 			</storageModule>
@@ -188,7 +188,7 @@
 						</toolChain>
 					</folderInfo>
 					<sourceEntries>
-						<entry excluding="QP/qs_rx.c|QP/qv.c|QP/qs.c|QP/qs_fp.c|QP/qs_64bit.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+						<entry excluding="QP/qxk.c|QP/qxk_xthr.c|QP/qxk_sema.c|QP/qxk_mutex.c|QP/qs_rx.c|QP/qv.c|QP/qs.c|QP/qs_fp.c|QP/qs_64bit.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 					</sourceEntries>
 				</configuration>
 			</storageModule>
@@ -286,7 +286,7 @@
 						</toolChain>
 					</folderInfo>
 					<sourceEntries>
-						<entry excluding="QP/qv.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+						<entry excluding="QP/qxk.c|QP/qxk_xthr.c|QP/qxk_sema.c|QP/qxk_mutex.c|QP/qv.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
 					</sourceEntries>
 				</configuration>
 			</storageModule>

+ 6 - 2
include/qf.h

@@ -4,8 +4,8 @@
 * @ingroup qf
 * @cond
 ******************************************************************************
-* Last updated for version 5.6.0
-* Last updated on  2015-12-18
+* Last updated for version 5.6.2
+* Last updated on  2016-02-10
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -379,6 +379,10 @@ bool QActive_defer(QMActive * const me,
 /*! Recall a deferred event from a given event queue. */
 bool QActive_recall(QMActive * const me, QEQueue * const eq);
 
+/*! Flush the specified deferred queue 'eq'. */
+uint_fast16_t QActive_flushDeferred(QMActive const * const me,
+                                    QEQueue * const eq);
+
 /*! Get an event from the event queue of an active object. */
 QEvt const *QActive_get_(QMActive *const me);
 

+ 2 - 2
ports/arm-cm/qk/iar/qf_port.h

@@ -46,7 +46,7 @@
 #define QF_MAX_TICK_RATE        2
 
 /* QF interrupt disable/enable and log2()... */
-#if (__CORE__ == __ARM6M__)  /* Cortex-M0/M0+/M1 ?, see NOTE02 */
+#if (__CORE__ == __ARM6M__)  /* Cortex-M0/M0+/M1 ?, see NOTE2 */
 
     #define QF_INT_DISABLE()    __disable_interrupt()
     #define QF_INT_ENABLE()     __enable_interrupt()
@@ -54,7 +54,7 @@
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE2 */
     #define QF_AWARE_ISR_CMSIS_PRI 0
 
-#else /* Cortex-M3/M4/M7, see NOTE03 */
+#else /* Cortex-M3/M4/M7, see NOTE3 */
 
     #define QF_INT_DISABLE()    __set_BASEPRI(QF_BASEPRI)
     #define QF_INT_ENABLE()     __set_BASEPRI(0U)

+ 3 - 2
ports/arm-cm/qk/ti/qf_port.h

@@ -3,8 +3,8 @@
 * @brief QF/C port to Cortex-M, preemptive QK kernel, TI-ARM toolset
 * @cond
 ******************************************************************************
-* Last Updated for Version: 5.5.1
-* Date of the Last Update:  2015-09-30
+* Last Updated for Version: 5.6.1
+* Date of the Last Update:  2015-12-30
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -56,6 +56,7 @@
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE4 */
     #define QF_AWARE_ISR_CMSIS_PRI  (QF_BASEPRI >> (8 - __NVIC_PRIO_BITS))
 
+    /* QF interrupt disable/enable */
     #define QF_INT_DISABLE()    QF_set_BASEPRI(QF_BASEPRI)
     #define QF_INT_ENABLE()     QF_set_BASEPRI(0U)
 

+ 1 - 1
ports/arm-cm/qv/arm/qf_port.h

@@ -59,7 +59,7 @@
     #define QF_INT_DISABLE()    QF_set_BASEPRI(QF_BASEPRI)
     #define QF_INT_ENABLE()     QF_set_BASEPRI(0U)
 
-    /* NOTE: keep in synch with the value defined in "qk_port.s", see NOTE4 */
+    /* NOTE: leave 2-bits for "kernel-unaware" interrupts, see NOTE4 */
     #define QF_BASEPRI          (0xFFU >> 2)
 
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE5 */

+ 4 - 4
ports/arm-cm/qv/gnu/qf_port.h

@@ -46,7 +46,7 @@
 #define QF_MAX_TICK_RATE        2
 
 /* QF interrupt disable/enable and log2()... */
-#if (__ARM_ARCH == 6) /* Cortex-M0/M0+/M1 ?, see NOTE02 */
+#if (__ARM_ARCH == 6) /* Cortex-M0/M0+/M1 ?, see NOTE2 */
 
     #define QF_INT_DISABLE()    __asm volatile ("cpsid i")
     #define QF_INT_ENABLE()     __asm volatile ("cpsie i")
@@ -54,7 +54,7 @@
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE2 */
     #define QF_AWARE_ISR_CMSIS_PRI  0
 
-#else /* Cortex-M3/M4/M4F, see NOTE03 */
+#else /* Cortex-M3/M4/M4F, see NOTE3 */
 
     #define QF_SET_BASEPRI(val_) __asm volatile (\
         "movs r0,%0 \n\t" \
@@ -62,13 +62,13 @@
     #define QF_INT_DISABLE()    QF_SET_BASEPRI(QF_BASEPRI)
     #define QF_INT_ENABLE()     QF_SET_BASEPRI(0U)
 
-    /* NOTE: keep in synch with the value defined in "qk_port.s", NOTE4 */
+    /* BASEPRI limit for QF-aware ISR priorities, see NOTE4 */
     #define QF_BASEPRI          (0xFFU >> 2)
 
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE5 */
     #define QF_AWARE_ISR_CMSIS_PRI (QF_BASEPRI >> (8 - __NVIC_PRIO_BITS))
 
-              /* Cortex-M3/M4/M4F provide the CLZ instruction for fast LOG2 */
+    /* Cortex-M3/M4/M4F provide the CLZ instruction for fast LOG2 */
     #define QF_LOG2(n_) ((uint8_t)(32U - __builtin_clz(n_)))
 
 #endif

+ 3 - 2
ports/arm-cm/qv/iar/qf_port.h

@@ -46,7 +46,7 @@
 #define QF_MAX_TICK_RATE        2
 
 /* QF interrupt disable/enable and log2()... */
-#if (__CORE__ == __ARM6M__)  /* Cortex-M0/M0+/M1 ?, see NOTE02 */
+#if (__CORE__ == __ARM6M__)  /* Cortex-M0/M0+/M1 ?, see NOTE2 */
 
     #define QF_INT_DISABLE()    __disable_interrupt()
     #define QF_INT_ENABLE()     __enable_interrupt()
@@ -59,7 +59,7 @@
     #define QF_INT_DISABLE()    __set_BASEPRI(QF_BASEPRI)
     #define QF_INT_ENABLE()     __set_BASEPRI(0U)
 
-    /* NOTE: keep in synch with the value defined in "qk_port.s", see NOTE4 */
+    /* NOTE: BASEPRI register value for disabling interrupts, see NOTE3 */
     #define QF_BASEPRI          (0xFFU >> 2)
 
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE5 */
@@ -67,6 +67,7 @@
 
     /* Cortex-M3/M4/M4F provide the CLZ instruction for fast LOG2 */
     #define QF_LOG2(n_) ((uint8_t)(32U - __CLZ(n_)))
+
 #endif
 
 /* QF critical section entry/exit... */

+ 3 - 3
ports/arm-cm/qv/ti/qf_port.h

@@ -3,8 +3,8 @@
 * @brief QF/C port to Cortex-M, cooperative QV kernel, TI-ARM CCS toolset
 * @cond
 ******************************************************************************
-* Last Updated for Version: 5.5.1
-* Date of the Last Update:  2015-09-30
+* Last Updated for Version: 5.6.1
+* Date of the Last Update:  2015-12-30
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -76,7 +76,7 @@
     /* QF-aware ISR priority for CMSIS function NVIC_SetPriority(), NOTE5 */
     #define QF_AWARE_ISR_CMSIS_PRI  0
 
-#endif /* M3/M4/M7 */
+#endif /* not M3/M4/M7 */
 
 /* QF critical section entry/exit */
 /* QF_CRIT_STAT_TYPE not defined: unconditional interrupt enabling" policy */

+ 16 - 5
ports/posix/qf_port.c

@@ -4,14 +4,14 @@
 * @ingroup ports
 * @cond
 ******************************************************************************
-* Last Updated for Version: 5.4.0
-* Date of the Last Update:  2015-05-04
+* Last Updated for Version: 5.6.2
+* Date of the Last Update:  2016-01-22
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -32,8 +32,8 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web:   www.state-machine.com
-* Email: info@state-machine.com
+* http://www.state-machine.com
+* mailto:info@state-machine.com
 ******************************************************************************
 * @endcond
 */
@@ -62,8 +62,19 @@ static bool l_isRunning;
 
 /*..........................................................................*/
 void QF_init(void) {
+    extern uint_fast8_t QF_maxPool_;
+    extern QTimeEvt QF_timeEvtHead_[QF_MAX_TICK_RATE];
+
     /* lock memory so we're never swapped out to disk */
     /*mlockall(MCL_CURRENT | MCL_FUTURE);  uncomment when supported */
+
+    /* clear the internal QF variables, so that the framework can (re)start
+    * correctly even if the startup code is not called to clear the
+    * uninitialized data (as is required by the C Standard).
+    */
+    QF_maxPool_ = (uint_fast8_t)0;
+    QF_bzero(&QF_timeEvtHead_[0], (uint_fast16_t)sizeof(QF_timeEvtHead_));
+    QF_bzero(&QF_active_[0],      (uint_fast16_t)sizeof(QF_active_));
 }
 /*..........................................................................*/
 int_t QF_run(void) {

+ 16 - 5
ports/win32-qv/qf_port.c

@@ -3,14 +3,14 @@
 * @brief QF/C port to Win32 with cooperative QV kernel (win32-qv)
 * @cond
 ******************************************************************************
-* Last Updated for Version: 5.4.2
-* Date of the Last Update:  2015-06-02
+* Last Updated for Version: 5.6.2
+* Date of the Last Update:  2016-01-22
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -31,8 +31,8 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web:   www.state-machine.com
-* Email: info@state-machine.com
+* http://www.state-machine.com
+* mailto:info@state-machine.com
 ******************************************************************************
 * @endcond
 */
@@ -63,8 +63,19 @@ static DWORD WINAPI ticker_thread(LPVOID arg);
 
 /* QF functions ============================================================*/
 void QF_init(void) {
+    extern uint_fast8_t QF_maxPool_;
+    extern QTimeEvt QF_timeEvtHead_[QF_MAX_TICK_RATE];
+
     InitializeCriticalSection(&l_win32CritSect);
     QV_win32Event_ = CreateEvent(NULL, FALSE, FALSE, NULL);
+
+    /* clear the internal QF variables, so that the framework can (re)start
+    * correctly even if the startup code is not called to clear the
+    * uninitialized data (as is required by the C Standard).
+    */
+    QF_maxPool_ = (uint_fast8_t)0;
+    QF_bzero(&QF_timeEvtHead_[0], (uint_fast16_t)sizeof(QF_timeEvtHead_));
+    QF_bzero(&QF_active_[0],      (uint_fast16_t)sizeof(QF_active_));
 }
 /****************************************************************************/
 void QF_enterCriticalSection_(void) {

+ 16 - 5
ports/win32/qf_port.c

@@ -4,14 +4,14 @@
 * @ingroup qf
 * @cond
 ******************************************************************************
-* Last Updated for Version: 5.4.0
-* Date of the Last Update:  2015-04-25
+* Last Updated for Version: 5.6.2
+* Date of the Last Update:  2016-01-22
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, LLC. state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -32,8 +32,8 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web:   www.state-machine.com
-* Email: info@state-machine.com
+* http://www.state-machine.com
+* mailto:info@state-machine.com
 ******************************************************************************
 * @endcond
 */
@@ -61,7 +61,18 @@ static DWORD WINAPI ao_thread(LPVOID arg);
 
 /* QF functions ============================================================*/
 void QF_init(void) {
+    extern uint_fast8_t QF_maxPool_;
+    extern QTimeEvt QF_timeEvtHead_[QF_MAX_TICK_RATE];
+
     InitializeCriticalSection(&l_win32CritSect);
+
+    /* clear the internal QF variables, so that the framework can (re)start
+    * correctly even if the startup code is not called to clear the
+    * uninitialized data (as is required by the C Standard).
+    */
+    QF_maxPool_ = (uint_fast8_t)0;
+    QF_bzero(&QF_timeEvtHead_[0], (uint_fast16_t)sizeof(QF_timeEvtHead_));
+    QF_bzero(&QF_active_[0],      (uint_fast16_t)sizeof(QF_active_));
 }
 /****************************************************************************/
 void QF_enterCriticalSection_(void) {

+ 10 - 4
source/qep_hsm.c

@@ -4,8 +4,8 @@
 * @ingroup qep
 * @cond
 ******************************************************************************
-* Last updated for version 5.5.0
-* Last updated on  2015-09-04
+* Last updated for version 5.6.1
+* Last updated on  2015-12-30
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -564,8 +564,11 @@ bool QHsm_isIn(QHsm * const me, QStateHandler const state) {
     bool inState = false; /* assume that this HSM is not in 'state' */
     QState r;
 
-    /** @pre the state configuration must be stable */
-    Q_REQUIRE_ID(600, me->temp.fun == me->state.fun);
+    /** @pre the QHsm state machine implementation strategy must be used
+    * and the state configuration must be stable
+    */
+    Q_REQUIRE_ID(600, (me->vptr->dispatch == &QHsm_dispatch_)
+                      && (me->temp.fun == me->state.fun));
 
     do {
         /* do the states match? */
@@ -607,6 +610,9 @@ QStateHandler QHsm_childState(QHsm * const me,
     bool isConfirmed = false; /* start with the child not confirmed */
     QState r;
 
+    /** @pre the QHsm state machine implementation strategy must be used */
+    Q_REQUIRE_ID(700, me->vptr->dispatch == &QHsm_dispatch_);
+
     /* establish stable state configuration */
     me->temp.fun = me->state.fun;
     do {

+ 8 - 2
source/qep_msm.c

@@ -4,8 +4,8 @@
 * @ingroup qep
 * @cond
 ******************************************************************************
-* Last updated for version 5.6.0
-* Last updated on  2015-12-18
+* Last updated for version 5.6.1
+* Last updated on  2015-12-30
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -518,6 +518,9 @@ bool QMsm_isInState(QMsm * const me, QMState const * const state) {
     bool inState = false; /* assume that this MSM is not in 'state' */
     QMState const *s;
 
+    /** @pre the QMsm state machine implementation strategy must be used */
+    Q_REQUIRE_ID(700, me->vptr->dispatch == &QMsm_dispatch_);
+
     for (s = me->state.obj; s != (QMState const *)0; s = s->superstate) {
         if (s == state) {
             inState = true; /* match found, return 'true' */
@@ -548,6 +551,9 @@ QMState const *QMsm_childStateObj(QMsm const * const me,
     bool isConfirmed = false; /* start with the child not confirmed */
     QMState const *s;
 
+    /** @pre the QMsm state machine implementation strategy must be used */
+    Q_REQUIRE_ID(800, me->vptr->dispatch == &QMsm_dispatch_);
+
     for (s = me->state.obj->superstate;
          s != (QMState const *)0;
          s = s->superstate)

+ 32 - 5
source/qf_defer.c

@@ -4,14 +4,14 @@
 * @ingroup qf
 * @cond
 ******************************************************************************
-* Last updated for version 5.4.2
-* Last updated on  2015-06-03
+* Last updated for version 5.6.2
+* Last updated on  2016-02-10
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
 *                    innovating embedded systems
 *
-* Copyright (C) Quantum Leaps, www.state-machine.com.
+* Copyright (C) Quantum Leaps, LLC. All rights reserved.
 *
 * This program is open source software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published
@@ -32,8 +32,8 @@
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * Contact information:
-* Web:   www.state-machine.com
-* Email: info@state-machine.com
+* http://www.state-machine.com
+* mailto:info@state-machine.com
 ******************************************************************************
 * @endcond
 */
@@ -130,3 +130,30 @@ bool QActive_recall(QMActive * const me, QEQueue * const eq) {
     }
     return recalled;
 }
+
+/****************************************************************************/
+/**
+* @description
+* This function is part of the event deferral support. An active object
+* can use this function to flush a given QF event queue. The function makes
+* sure that the events are not leaked.
+*
+* @param[in,out] me  pointer (see @ref oop)
+* @param[in]     eq  pointer to a "raw" thread-safe queue to flush.
+*
+* @returns the number of events actually flushed from the queue.
+*
+* @sa QActive_defer(), QActive_recall(), QEQueue
+*/
+uint_fast16_t QActive_flushDeferred(QMActive const * const me,
+                                    QEQueue * const eq)
+{
+    uint_fast16_t n = (uint_fast16_t)0;
+    QEvt const *e;
+    for (e = QEQueue_get(eq); e != (QEvt const *)0; e = QEQueue_get(eq)) {
+        QF_gc(e); /* garbage collect */
+        ++n; /* count the flushed event */
+    }
+    return n;
+}
+

+ 17 - 11
source/qf_time.c

@@ -4,8 +4,8 @@
 * @ingroup qf
 * @cond
 ******************************************************************************
-* Last updated for version 5.6.0
-* Last updated on  2015-11-23
+* Last updated for version 5.6.2
+* Last updated on  2016-01-27
 *
 *                    Q u a n t u m     L e a P s
 *                    ---------------------------
@@ -92,7 +92,7 @@ void QF_tickX_(uint_fast8_t const tickRate, void const * const sender)
         /* end of the list? */
         if (t == (QTimeEvt *)0) {
 
-            /* no newly armed time events? */
+            /* any new time events armed since the last run of QF_tickX_()? */
             if (QF_timeEvtHead_[tickRate].act != (void *)0) {
 
                 /* sanity check */
@@ -106,7 +106,7 @@ void QF_tickX_(uint_fast8_t const tickRate, void const * const sender)
             }
         }
 
-        /* time evt. scheduled for removal? */
+        /* time event scheduled for removal? */
         if (t->ctr == (QTimeEvtCtr)0) {
             prev->next = t->next;
             t->super.refCtr_ &= (uint8_t)0x7F; /* mark as unlinked */
@@ -121,7 +121,7 @@ void QF_tickX_(uint_fast8_t const tickRate, void const * const sender)
 
             /* is time event about to expire? */
             if (t->ctr == (QTimeEvtCtr)0) {
-                QMActive *act = (QMActive *)t->act; /* temporary for volatile */
+                QMActive *act = (QMActive *)t->act; /* temp. for volatile */
 
                 /* periodic time evt? */
                 if (t->interval != (QTimeEvtCtr)0) {
@@ -300,10 +300,10 @@ void QTimeEvt_armX(QTimeEvt * const me,
     * number of clock ticks cannot be zero, and the signal must be valid.
     */
     Q_REQUIRE_ID(400, (me->act != (void *)0)
-              && (ctr == (QTimeEvtCtr)0)
-              && (nTicks != (QTimeEvtCtr)0)
-              && (tickRate < (uint_fast8_t)QF_MAX_TICK_RATE)
-              && (me->super.sig >= (QSignal)Q_USER_SIG));
+                      && (ctr == (QTimeEvtCtr)0)
+                      && (nTicks != (QTimeEvtCtr)0)
+                      && (tickRate < (uint_fast8_t)QF_MAX_TICK_RATE)
+                      && (me->super.sig >= (QSignal)Q_USER_SIG));
 
     QF_CRIT_ENTRY_();
     me->ctr = nTicks;
@@ -315,7 +315,7 @@ void QTimeEvt_armX(QTimeEvt * const me,
     * because un-linking is performed exclusively in the QF_tickX() function.
     */
     if ((me->super.refCtr_ & (uint8_t)0x80) == (uint8_t)0) {
-        me->super.refCtr_ |= (uint8_t)0x80;       /* mark as linked */
+        me->super.refCtr_ |= (uint8_t)0x80;  /* mark as linked */
 
         /* The time event is initially inserted into the separate
         * "freshly armed" link list based on QF_timeEvtHead_[tickRate].act.
@@ -470,7 +470,13 @@ bool QTimeEvt_rearm(QTimeEvt * const me, QTimeEvtCtr const nTicks) {
         QS_OBJ_(me->act);      /* the target AO */
         QS_TEC_(me->ctr);      /* the number of ticks */
         QS_TEC_(me->interval); /* the interval */
-        QS_2U8_((uint8_t)tickRate, (uint8_t)isArmed);
+        QS_U8_((uint8_t)tickRate); /* the tick rate */
+        if (isArmed) {
+            QS_U8_((uint8_t)1); /* status: armed */
+        }
+        else {
+            QS_U8_((uint8_t)0); /* status: dis-armed */
+        }
     QS_END_NOCRIT_()
 
     QF_CRIT_EXIT_();