git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@566 35acf78f-673a-0410-8e92-d51de3d6d3f4
23
docs/ch.txt
|
@ -79,7 +79,7 @@
|
||||||
* priority is executed. If more than one thread with equal priority are
|
* priority is executed. If more than one thread with equal priority are
|
||||||
* eligible for execution then they are executed in a round-robin way, the
|
* eligible for execution then they are executed in a round-robin way, the
|
||||||
* CPU time slice constant is configurable. The ready list is a double linked
|
* CPU time slice constant is configurable. The ready list is a double linked
|
||||||
* list of threads ordered by priority.
|
* list of threads ordered by priority.<br><br>
|
||||||
* @image html readylist.png
|
* @image html readylist.png
|
||||||
* Note that the currently running thread is not in the ready list, the list
|
* Note that the currently running thread is not in the ready list, the list
|
||||||
* only contains the threads ready to be executed but still actually waiting.
|
* only contains the threads ready to be executed but still actually waiting.
|
||||||
|
@ -89,19 +89,26 @@
|
||||||
* @image html states.png
|
* @image html states.png
|
||||||
*
|
*
|
||||||
* @section warea Thread Working Area
|
* @section warea Thread Working Area
|
||||||
* Each thread has its own stack, a Thread structure and a registers dump
|
* Each thread has its own stack, a Thread structure and some preemption
|
||||||
* structure. All the structures are allocated into a "Thread working area",
|
* areas. All the structures are allocated into a "Thread working area",
|
||||||
* a thread private heap, usually allocated in a char array declared in your
|
* a thread private heap, usually allocated in a char array declared in your
|
||||||
* code, there is not a central threads table or list, this means you can
|
* code, there is not a central threads table or list, this means you can
|
||||||
* have as many threads you want as long you have enough available RAM
|
* have as many threads you want as long you have enough available RAM
|
||||||
* memory. The threads do not use any memory outside the allocated working
|
* memory. The threads do not use any memory outside the allocated working
|
||||||
* area.<br>
|
* area.<br><br>
|
||||||
* @image html workspace.png
|
* @image html workspace.png
|
||||||
* <br>
|
* <br>
|
||||||
* Note that the registers dump is only present when the Thread is not
|
* Note that the preemption areas only present when the Thread is not
|
||||||
* running, the context switching is done by pushing the registers on the
|
* running (switched out), the context switching is done by pushing the
|
||||||
* stack of the switched-out thread and popping the registers of the
|
* registers on the stack of the switched-out thread and popping the registers
|
||||||
* switched-in thread from its stack.
|
* of the switched-in thread from its stack.
|
||||||
|
* The preemption areas can be divided in up to three structures:
|
||||||
|
* - External Context.
|
||||||
|
* - Interrupt Stack.
|
||||||
|
* - Internal Context.
|
||||||
|
*
|
||||||
|
* See the @ref Core documentation for details, the areas may change on
|
||||||
|
* the various ports and some structures may not be present (or be zero-sized).
|
||||||
*
|
*
|
||||||
* @section sysmutex System Mutex Zone
|
* @section sysmutex System Mutex Zone
|
||||||
* It is the code within the OS that cannot be preempted, this code is
|
* It is the code within the OS that cannot be preempted, this code is
|
||||||
|
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 12 KiB |
|
@ -15,10 +15,10 @@
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.45.1"
|
inkscape:version="0.45.1"
|
||||||
version="1.0"
|
version="1.0"
|
||||||
sodipodi:docbase="C:\Progetti\ChibiOS\homepage"
|
sodipodi:docbase="D:\Progetti\ChibiOS-RT\docs\img"
|
||||||
sodipodi:docname="readylist.svg"
|
sodipodi:docname="readylist.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
inkscape:export-filename="C:\Progetti\ChibiOS\homepage\readylist.png"
|
inkscape:export-filename="D:\Progetti\ChibiOS-RT\docs\img\readylist.png"
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90">
|
inkscape:export-ydpi="90">
|
||||||
<defs
|
<defs
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
inkscape:pageopacity="0.0"
|
inkscape:pageopacity="0.0"
|
||||||
inkscape:pageshadow="2"
|
inkscape:pageshadow="2"
|
||||||
inkscape:zoom="1.515"
|
inkscape:zoom="1.515"
|
||||||
inkscape:cx="300"
|
inkscape:cx="306.4941"
|
||||||
inkscape:cy="100"
|
inkscape:cy="100"
|
||||||
inkscape:document-units="px"
|
inkscape:document-units="px"
|
||||||
inkscape:current-layer="layer1"
|
inkscape:current-layer="layer1"
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
id="layer1">
|
id="layer1">
|
||||||
<g
|
<g
|
||||||
id="g3209"
|
id="g3209"
|
||||||
transform="translate(-49.968987,0.5)">
|
transform="translate(-46.668657,15)">
|
||||||
<rect
|
<rect
|
||||||
y="75.531006"
|
y="75.531006"
|
||||||
x="180.5"
|
x="180.5"
|
||||||
|
@ -154,11 +154,11 @@
|
||||||
height="17.601761"
|
height="17.601761"
|
||||||
width="37.953796"
|
width="37.953796"
|
||||||
id="rect3221" /></flowRegion><flowPara
|
id="rect3221" /></flowRegion><flowPara
|
||||||
id="flowPara3223">127</flowPara></flowRoot> </g>
|
id="flowPara3223">63</flowPara></flowRoot> </g>
|
||||||
<flowRoot
|
<flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot3188"
|
id="flowRoot3188"
|
||||||
transform="translate(2.3476563,-323.87454)"><flowRegion
|
transform="translate(10.05033,-293.30812)"><flowRegion
|
||||||
id="flowRegion3190"><rect
|
id="flowRegion3190"><rect
|
||||||
id="rect3192"
|
id="rect3192"
|
||||||
width="207.01047"
|
width="207.01047"
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
id="flowPara3214"
|
id="flowPara3214"
|
||||||
style="fill:url(#linearGradient3230);fill-opacity:1">Thread Structure</flowPara></flowRoot> <g
|
style="fill:url(#linearGradient3230);fill-opacity:1">Thread Structure</flowPara></flowRoot> <g
|
||||||
id="g5453"
|
id="g5453"
|
||||||
transform="translate(-169.96899,0.5)">
|
transform="translate(-166.66866,15)">
|
||||||
<rect
|
<rect
|
||||||
y="75.531006"
|
y="75.531006"
|
||||||
x="180.5"
|
x="180.5"
|
||||||
|
@ -207,10 +207,10 @@
|
||||||
height="17.601761"
|
height="17.601761"
|
||||||
width="37.953796"
|
width="37.953796"
|
||||||
id="rect5449" /></flowRegion><flowPara
|
id="rect5449" /></flowRegion><flowPara
|
||||||
id="flowPara5451">126</flowPara></flowRoot> </g>
|
id="flowPara5451">62</flowPara></flowRoot> </g>
|
||||||
<g
|
<g
|
||||||
id="g5478"
|
id="g5478"
|
||||||
transform="translate(70.031013,0.5)">
|
transform="translate(73.331343,15)">
|
||||||
<rect
|
<rect
|
||||||
y="75.531006"
|
y="75.531006"
|
||||||
x="180.5"
|
x="180.5"
|
||||||
|
@ -236,10 +236,10 @@
|
||||||
height="17.601761"
|
height="17.601761"
|
||||||
width="37.953796"
|
width="37.953796"
|
||||||
id="rect5490" /></flowRegion><flowPara
|
id="rect5490" /></flowRegion><flowPara
|
||||||
id="flowPara5492">128</flowPara></flowRoot> </g>
|
id="flowPara5492">64</flowPara></flowRoot> </g>
|
||||||
<g
|
<g
|
||||||
id="g5494"
|
id="g5494"
|
||||||
transform="translate(190.03101,0.5)">
|
transform="translate(193.33134,15)">
|
||||||
<rect
|
<rect
|
||||||
y="75.531006"
|
y="75.531006"
|
||||||
x="180.5"
|
x="180.5"
|
||||||
|
@ -265,9 +265,10 @@
|
||||||
height="17.601761"
|
height="17.601761"
|
||||||
width="37.953796"
|
width="37.953796"
|
||||||
id="rect5506" /></flowRegion><flowPara
|
id="rect5506" /></flowRegion><flowPara
|
||||||
id="flowPara5508">128</flowPara></flowRoot> </g>
|
id="flowPara5508">64</flowPara></flowRoot> </g>
|
||||||
<g
|
<g
|
||||||
id="g5533">
|
id="g5533"
|
||||||
|
transform="translate(3.30033,14.5)">
|
||||||
<rect
|
<rect
|
||||||
y="76.031006"
|
y="76.031006"
|
||||||
x="490.53101"
|
x="490.53101"
|
||||||
|
@ -295,44 +296,44 @@
|
||||||
id="rect5522" /></flowRegion><flowPara
|
id="rect5522" /></flowRegion><flowPara
|
||||||
id="flowPara5524">Header</flowPara></flowRoot> </g>
|
id="flowPara5524">Header</flowPara></flowRoot> </g>
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 39.5,100.42 C 39.5,60.339108 39.5,60.339108 39.5,60.339108 C 130.57824,60.339108 130.57824,60.339108 130.57824,60.339108 C 130.57824,75.369443 130.57824,75.369443 130.57824,75.369443"
|
d="M 42.80033,114.92 C 42.80033,74.839108 42.80033,74.839108 42.80033,74.839108 C 133.87857,74.839108 133.87857,74.839108 133.87857,74.839108 C 133.87857,89.869443 133.87857,89.869443 133.87857,89.869443"
|
||||||
id="path6523" />
|
id="path6523" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 520.5,100.48159 L 520.5,45.5 L 10.751521,45.5 L 10.751521,45.5 L 10.751521,75.489955"
|
d="M 523.80033,114.98159 L 523.80033,60 L 14.051851,60 L 14.051851,60 L 14.051851,89.989955"
|
||||||
id="path6535" />
|
id="path6535" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 159.5,100.42 C 159.5,60.3391 159.5,60.3391 159.5,60.3391 C 250.57824,60.3391 250.57824,60.3391 250.57824,60.3391 C 250.57824,75.36944 250.57824,75.36944 250.57824,75.36944"
|
d="M 162.80033,114.92 C 162.80033,74.8391 162.80033,74.8391 162.80033,74.8391 C 253.87857,74.8391 253.87857,74.8391 253.87857,74.8391 C 253.87857,89.86944 253.87857,89.86944 253.87857,89.86944"
|
||||||
id="path3195" />
|
id="path3195" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 279.5,100.42 C 279.5,60.33911 279.5,60.33911 279.5,60.33911 C 370.57824,60.33911 370.57824,60.33911 370.57824,60.33911 C 370.57824,75.36944 370.57824,75.36944 370.57824,75.36944"
|
d="M 282.80033,114.92 C 282.80033,74.83911 282.80033,74.83911 282.80033,74.83911 C 373.87857,74.83911 373.87857,74.83911 373.87857,74.83911 C 373.87857,89.86944 373.87857,89.86944 373.87857,89.86944"
|
||||||
id="path3197" />
|
id="path3197" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 399.5,100.42 C 399.5,60.33911 399.5,60.33911 399.5,60.33911 C 490.57824,60.33911 490.57824,60.33911 490.57824,60.33911 C 490.57824,75.36944 490.57824,75.36944 490.57824,75.36944"
|
d="M 402.80033,114.92 C 402.80033,74.83911 402.80033,74.83911 402.80033,74.83911 C 493.87857,74.83911 493.87857,74.83911 493.87857,74.83911 C 493.87857,89.86944 493.87857,89.86944 493.87857,89.86944"
|
||||||
id="path3199" />
|
id="path3199" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 140.5,99.58 C 140.5,139.48422 140.5,139.48422 140.5,139.48422 C 9.9374,139.48422 9.9374,139.48422 9.9374,139.48422 C 9.9374,124.52014 9.9374,124.52014 9.9374,124.52014"
|
d="M 143.80033,114.08 C 143.80033,153.98422 143.80033,153.98422 143.80033,153.98422 C 13.23773,153.98422 13.23773,153.98422 13.23773,153.98422 C 13.23773,139.02014 13.23773,139.02014 13.23773,139.02014"
|
||||||
id="path3201" />
|
id="path3201" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-opacity:1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-mid:none;marker-end:url(#Arrow1Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 380.5,99.58 C 380.5,139.48422 380.5,139.48422 380.5,139.48422 C 249.9374,139.48422 249.9374,139.48422 249.9374,139.48422 C 249.9374,124.52014 249.9374,124.52014 249.9374,124.52014"
|
d="M 383.80033,114.08 C 383.80033,153.98422 383.80033,153.98422 383.80033,153.98422 C 253.23773,153.98422 253.23773,153.98422 253.23773,153.98422 C 253.23773,139.02014 253.23773,139.02014 253.23773,139.02014"
|
||||||
id="path3205" />
|
id="path3205" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 260.5,99.58 L 260.5,149.58 L 130.5,149.58 L 130.5,124.58"
|
d="M 263.80033,114.08 L 263.80033,164.08 L 133.80033,164.08 L 133.80033,139.08"
|
||||||
id="path3225" />
|
id="path3225" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 500.5,99.58 L 500.5,149.58 L 370.5,149.58 L 370.5,124.58"
|
d="M 503.80033,114.08 L 503.80033,164.08 L 373.80033,164.08 L 373.80033,139.08"
|
||||||
id="path3425" />
|
id="path3425" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:url(#Dot_l);marker-end:url(#Arrow2Mend);stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 20,100 L 20,160 L 490,160 L 490,125"
|
d="M 23.30033,114.5 L 23.30033,174.5 L 493.30033,174.5 L 493.30033,139.5"
|
||||||
id="path3427" />
|
id="path3427" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 20 KiB |
|
@ -15,10 +15,10 @@
|
||||||
sodipodi:version="0.32"
|
sodipodi:version="0.32"
|
||||||
inkscape:version="0.45.1"
|
inkscape:version="0.45.1"
|
||||||
version="1.0"
|
version="1.0"
|
||||||
sodipodi:docbase="C:\Progetti\ChibiOS\homepage"
|
sodipodi:docbase="D:\Progetti\ChibiOS-RT\docs\img"
|
||||||
sodipodi:docname="workspace.svg"
|
sodipodi:docname="workspace.svg"
|
||||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||||
inkscape:export-filename="C:\Progetti\ChibiOS\homepage\workspace.png"
|
inkscape:export-filename="D:\Progetti\ChibiOS-RT\docs\img\workspace.png"
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90">
|
inkscape:export-ydpi="90">
|
||||||
<defs
|
<defs
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
objecttolerance="1"
|
objecttolerance="1"
|
||||||
guidetolerance="1"
|
guidetolerance="1"
|
||||||
inkscape:window-width="993"
|
inkscape:window-width="993"
|
||||||
inkscape:window-height="870"
|
inkscape:window-height="871"
|
||||||
inkscape:window-x="139"
|
inkscape:window-x="352"
|
||||||
inkscape:window-y="66" />
|
inkscape:window-y="69" />
|
||||||
<metadata
|
<metadata
|
||||||
id="metadata2165">
|
id="metadata2165">
|
||||||
<rdf:RDF>
|
<rdf:RDF>
|
||||||
|
@ -149,37 +149,37 @@
|
||||||
inkscape:export-xdpi="90"
|
inkscape:export-xdpi="90"
|
||||||
inkscape:export-ydpi="90" />
|
inkscape:export-ydpi="90" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0;stroke-opacity:1"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker-start:none;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 110.44572,50.481444 C 249.51856,50.481444 249.51856,50.481444 249.51856,50.481444"
|
d="M 110.5,74.5 C 249.57284,74.5 249.57284,74.5 249.57284,74.5"
|
||||||
id="path3245" />
|
id="path3245" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0;stroke-opacity:1"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
d="M 110.44572,80.481444 C 249.51856,80.481444 249.51856,80.481444 249.51856,80.481444"
|
d="M 110.5,149.5 C 249.57284,149.5 249.57284,149.5 249.57284,149.5"
|
||||||
id="path3247" />
|
id="path3247" />
|
||||||
<flowRoot
|
<flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot3249"
|
id="flowRoot3249"
|
||||||
transform="translate(131.71875,-62.610866)"><flowRegion
|
transform="translate(125.4043,-62.808117)"><flowRegion
|
||||||
id="flowRegion3251"><rect
|
id="flowRegion3251"><rect
|
||||||
id="rect3253"
|
id="rect3253"
|
||||||
width="97.01046"
|
width="107.01046"
|
||||||
height="17.563538"
|
height="12.563538"
|
||||||
x="2.9895365"
|
x="2.9895365"
|
||||||
y="332.43646" /></flowRegion><flowPara
|
y="332.43646" /></flowRegion><flowPara
|
||||||
id="flowPara3255">Thread Structure</flowPara></flowRoot> <flowRoot
|
id="flowPara3255">Thread Structure</flowPara></flowRoot> <flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot3257"
|
id="flowRoot3257"
|
||||||
transform="translate(136.05664,-274.98977)"><flowRegion
|
transform="translate(133.58398,-197.80812)"><flowRegion
|
||||||
id="flowRegion3259"><rect
|
id="flowRegion3259"><rect
|
||||||
id="rect3261"
|
id="rect3261"
|
||||||
width="97.01046"
|
width="102.01046"
|
||||||
height="17.563538"
|
height="17.563538"
|
||||||
x="2.9895365"
|
x="2.9895365"
|
||||||
y="332.43646" /></flowRegion><flowPara
|
y="332.43646" /></flowRegion><flowPara
|
||||||
id="flowPara3263">Registers Dump</flowPara></flowRoot> <flowRoot
|
id="flowPara3263">intctx Structure</flowPara></flowRoot> <flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot3265"
|
id="flowRoot3265"
|
||||||
transform="translate(141.71875,-307.61087)"><flowRegion
|
transform="translate(137.71094,-292.80812)"><flowRegion
|
||||||
id="flowRegion3267"><rect
|
id="flowRegion3267"><rect
|
||||||
id="rect3269"
|
id="rect3269"
|
||||||
width="97.01046"
|
width="97.01046"
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
id="flowPara3273">Thread Stack</flowPara></flowRoot> <flowRoot
|
id="flowPara3273">Thread Stack</flowPara></flowRoot> <flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot3277"
|
id="flowRoot3277"
|
||||||
transform="translate(0.4335938,-258.72805)"><flowRegion
|
transform="translate(1.2089844,-187.09523)"><flowRegion
|
||||||
id="flowRegion3279"><rect
|
id="flowRegion3279"><rect
|
||||||
id="rect3281"
|
id="rect3281"
|
||||||
width="97.01046"
|
width="97.01046"
|
||||||
|
@ -202,7 +202,7 @@
|
||||||
id="path3487" />
|
id="path3487" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.6978516px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.6978516px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
|
||||||
d="M 100.16177,81.570166 C 109.12769,81.570166 109.12769,81.570166 109.12769,81.570166"
|
d="M 100.34893,148.42983 C 109.31485,148.42983 109.31485,148.42983 109.31485,148.42983"
|
||||||
id="path3489" />
|
id="path3489" />
|
||||||
<path
|
<path
|
||||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.6978516px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.6978516px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
|
||||||
|
@ -218,10 +218,10 @@
|
||||||
<flowRoot
|
<flowRoot
|
||||||
xml:space="preserve"
|
xml:space="preserve"
|
||||||
id="flowRoot2208"
|
id="flowRoot2208"
|
||||||
transform="translate(122.00391,-93.728054)"><flowRegion
|
transform="translate(112.03516,-92.095227)"><flowRegion
|
||||||
id="flowRegion2210"><rect
|
id="flowRegion2210"><rect
|
||||||
id="rect2212"
|
id="rect2212"
|
||||||
width="117.01046"
|
width="132.01047"
|
||||||
height="17.563538"
|
height="17.563538"
|
||||||
x="2.9895365"
|
x="2.9895365"
|
||||||
y="332.43646" /></flowRegion><flowPara
|
y="332.43646" /></flowRegion><flowPara
|
||||||
|
@ -239,5 +239,47 @@
|
||||||
height="17.563538"
|
height="17.563538"
|
||||||
x="2.9895365"
|
x="2.9895365"
|
||||||
y="332.43646" /></flowRegion><flowPara
|
y="332.43646" /></flowRegion><flowPara
|
||||||
id="flowPara2224">chThdLS()</flowPara></flowRoot> </g>
|
id="flowPara2224">chThdLS()</flowPara></flowRoot> <flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot2209"
|
||||||
|
transform="translate(2.3710937,-107.80812)"><flowRegion
|
||||||
|
id="flowRegion2211"><rect
|
||||||
|
id="rect2213"
|
||||||
|
width="97.01046"
|
||||||
|
height="17.563538"
|
||||||
|
x="2.9895365"
|
||||||
|
y="332.43646" /></flowRegion><flowPara
|
||||||
|
id="flowPara2215">Stack Limit</flowPara></flowRoot> <path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.6978516px;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#Arrow1Mend);stroke-opacity:1"
|
||||||
|
d="M 100.16177,231.57017 C 109.12769,231.57017 109.12769,231.57017 109.12769,231.57017"
|
||||||
|
id="path2217" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="M 110.42716,125.5 C 249.5,125.5 249.5,125.5 249.5,125.5"
|
||||||
|
id="path2221" />
|
||||||
|
<path
|
||||||
|
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1, 1;stroke-dashoffset:0;stroke-opacity:1"
|
||||||
|
d="M 110.42716,100.5 C 249.5,100.5 249.5,100.5 249.5,100.5"
|
||||||
|
id="path2223" />
|
||||||
|
<flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot2225"
|
||||||
|
transform="translate(130.04492,-248.01905)"><flowRegion
|
||||||
|
id="flowRegion2227"><rect
|
||||||
|
id="rect2229"
|
||||||
|
width="102.01046"
|
||||||
|
height="17.563538"
|
||||||
|
x="2.9895365"
|
||||||
|
y="332.43646" /></flowRegion><flowPara
|
||||||
|
id="flowPara2231">extctx Structure</flowPara></flowRoot> <flowRoot
|
||||||
|
xml:space="preserve"
|
||||||
|
id="flowRoot2235"
|
||||||
|
transform="translate(110.82227,-224.75538)"><flowRegion
|
||||||
|
id="flowRegion2237"><rect
|
||||||
|
id="rect2239"
|
||||||
|
width="137.01047"
|
||||||
|
height="17.563538"
|
||||||
|
x="2.9895365"
|
||||||
|
y="332.43646" /></flowRegion><flowPara
|
||||||
|
id="flowPara2241">INT_REQUIRED_STACK</flowPara></flowRoot> </g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 12 KiB |
|
@ -88,12 +88,19 @@ void chSysUnlock(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context switch.
|
* Performs a context switch.
|
||||||
|
* This is the most critical code in any port, this function is responsible
|
||||||
|
* for the context switch between 2 threads.
|
||||||
|
* @param otp the thread to be switched out
|
||||||
|
* @param ntp the thread to be switched in
|
||||||
|
* @note The implementation of this code affects <b>directly</b> the context
|
||||||
|
* switch performance so optimize here as much as you can.
|
||||||
*/
|
*/
|
||||||
void chSysSwitchI(Thread *otp, Thread *ntp) {}
|
void chSysSwitchI(Thread *otp, Thread *ntp) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints a message on the system console (if any).
|
* Prints a message on the system console (if any).
|
||||||
|
* @param msg the message to be printed on the system console
|
||||||
*/
|
*/
|
||||||
void chSysPuts(char *msg) {
|
void chSysPuts(char *msg) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,27 +32,39 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base type for stack alignment.
|
* Base type for stack alignment.
|
||||||
|
* This type is used only for stack alignment reasons thus can be anything from
|
||||||
|
* a char to a double.
|
||||||
*/
|
*/
|
||||||
typedef uint8_t stkalign_t;
|
typedef uint8_t stkalign_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interrupt saved context.
|
* Interrupt saved context.
|
||||||
|
* This structure represents the stack frame saved during a preemption-capable
|
||||||
|
* interrupt handler.
|
||||||
*/
|
*/
|
||||||
struct extctx {
|
struct extctx {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* System saved context.
|
* System saved context.
|
||||||
|
* This structure represents the inner stack frame during a context switching.
|
||||||
*/
|
*/
|
||||||
struct intctx {
|
struct intctx {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Platform dependent part of the @p Thread structure.
|
||||||
|
* This structure usually contains just the saved stack pointer defined as a
|
||||||
|
* pointer to a @p intctx structure.
|
||||||
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct intctx *sp;
|
struct intctx *sp;
|
||||||
} Context;
|
} Context;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platform dependent part of the \p chThdCreate() API.
|
* Platform dependent part of the \p chThdCreate() API.
|
||||||
|
* This code usually setup the context switching frame represented by a
|
||||||
|
* @p intctx structure.
|
||||||
*/
|
*/
|
||||||
#define SETUP_CONTEXT(workspace, wsize, pf, arg) \
|
#define SETUP_CONTEXT(workspace, wsize, pf, arg) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -60,12 +72,18 @@ typedef struct {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stack size for the system idle thread.
|
* Stack size for the system idle thread.
|
||||||
|
* This size depends on the idle thread implementation, usually the idle
|
||||||
|
* thread should take no more space than those reserved
|
||||||
|
* by @p INT_REQUIRED_STACK.
|
||||||
*/
|
*/
|
||||||
#define IDLE_THREAD_STACK_SIZE 0
|
#define IDLE_THREAD_STACK_SIZE 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Per-thread stack overhead for interrupts servicing, it is used in the
|
* Per-thread stack overhead for interrupts servicing, it is used in the
|
||||||
* calculation of the correct working area size.
|
* calculation of the correct working area size.
|
||||||
|
* This value can be zero on those architecture where there is a separate
|
||||||
|
* interrupt stack and the stack space between @p intctx and @p extctx is
|
||||||
|
* known to be zero.
|
||||||
*/
|
*/
|
||||||
#define INT_REQUIRED_STACK 0
|
#define INT_REQUIRED_STACK 0
|
||||||
|
|
||||||
|
|