<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Wendell, thank you for your answer... I
      try to explain better:<br>
      - task1 makes a led blinking (in a while cycle)<br>
      - task2 print a simple "hello world"<br>
      <br>
      I want "hello world" to be printed while led is blinking. How can
      I share CPU with these two tasks?<br>
      Shall I delete task at the end? Shall I define a semaphore? <br>
      I tried to modify task priority but it has no effects...<br>
      Even if led blinking (task 1) start, task 2 doesn't...  <br>
      <br>
      Hope now it's clearer...<br>
      <br>
          Luca<br>
      <br>
          <br>
      <br>
      Il 19/09/2012 17.18, Wendell Pereira da Silva ha scritto:<br>
    </div>
    <blockquote
cite="mid:8F0C6606140B8146B6ABCC062597420101EDDE71FF82@ADEXC07A.intranet.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <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]-->
      <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
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">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
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">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
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">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
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">Probably task one has higher priority than task
            two, and task one never blocks.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">A good reference is the <a
              moz-do-not-send="true"
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
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">Hope it helps.<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US">--Wendell<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"
            lang="EN-US"><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">
                <a class="moz-txt-link-abbreviated" href="mailto:rtems-users-bounces@rtems.org">rtems-users-bounces@rtems.org</a>
                [<a class="moz-txt-link-freetext" href="mailto:rtems-users-bounces@rtems.org">mailto:rtems-users-bounces@rtems.org</a>] <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> <a class="moz-txt-link-abbreviated" href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><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 moz-do-not-send="true"
              href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a>
            <br>
            <a moz-do-not-send="true"
              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>
    </blockquote>
    <br>
  </body>
</html>