<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
span.EstiloDeEmail17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1829782713;
mso-list-type:hybrid;
mso-list-template-ids:-1534010758 -2070242734 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:24.75pt;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
@list l1
{mso-list-id:1899432401;
mso-list-type:hybrid;
mso-list-template-ids:-1034879048 1179705048 68550659 68550661 68550657 68550659 68550661 68550657 68550659 68550661;}
@list l1:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:22.5pt;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:Calibri;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=PT-BR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Luca,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Unless you have two CPUs (or a dual core CPU) and SMP support for your BSP, it’s impossible to get two tasks running at the same time (if I understood what you mean “… a second task running when one is still running).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In most cases, on single core (or single processor) BSP’s tasks share the same CPU being droved by any scheduling policy implemented in the RTOS.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If you want your tasks sharing the CPU, please, check the tasks priority, attributes and execution mode.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:6.75pt'><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Probably task one has higher priority than task two, and task one never blocks.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>A good reference is the <a href="http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/pdf/c_user.pdf">RTEMS Users Guide</a>, topic 5.2.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hope it helps.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>--Wendell<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>De:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> rtems-users-bounces@rtems.org [mailto:rtems-users-bounces@rtems.org] <b>Em nome de </b>Luca Cinquepalmi<br><b>Enviada em:</b> quarta-feira, 19 de setembro de 2012 11:16<br><b>Para:</b> Joel Sherrill<br><b>Cc:</b> rtems-users@rtems.org<br><b>Assunto:</b> Re: testing multitasking rtems<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>How can I run Two tasks in the same time? Evey task ends with delete_task so the next task starts<br>when the previous is finished. How can I make a second task running when task one is still running?<br><br>Example:<br><br><span style='font-size:10.0pt'>rtems_task Init(rtems_task_argument ignored)<br>{<br> <br> ...<br> rtems_task_start(task_id1...)<br> rtems_task_start(task_id2...)<br> ...<br>}</span><br><br><br>I want that task 2 starts while task1 is still running? How can I do this?<br>Thank you<br><br> Luca<br><br><br><br>Il 18/09/2012 13.12, Joel Sherrill ha scritto:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>On 09/18/2012 06:07 AM, Luca Cinquepalmi wrote: <br><br><o:p></o:p></p><p class=MsoNormal>Hi all, <br>is there on line or in rtems documentaion any exmaple (c source code) of <br>how testing multitasking? <o:p></o:p></p><p class=MsoNormal>Nearly every test is multitasking. All are if you consider there is <br>at least an application task/thread and an idle task. <br><br>The most basic tests for a BSP are hello and ticker. Ticker has <br>3 user tasks which run at different intervals. <br><br><o:p></o:p></p><p class=MsoNormal>I'm not able to find any suggestion. Thank you <br><br> Luca <br>_______________________________________________ <br>rtems-users mailing list <br><a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a> <br><a href="http://www.rtems.org/mailman/listinfo/rtems-users">http://www.rtems.org/mailman/listinfo/rtems-users</a> <o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p></blockquote><p class=MsoNormal><o:p> </o:p></p></div></body></html>