<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>multitasking problem</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/40769/multitasking-problem</link><description> 
Hi, i am new to real-time systems and rtx. my doubt is i have
written a program in which i am creating two tasks one with while
loop(task1) and one doesn&amp;#39;t have while loop(task2),both with same
priority. 

 
my doubt here is when i execute my program</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: multitasking problem</title><link>https://community.arm.com/thread/107972?ContentTypeID=1</link><pubDate>Fri, 14 Nov 2014 01:17:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c807ed55-ea90-4aa8-9c9e-c5ebe0f9ec04</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
It is the case that you get undefined behaviour if you run out of
a task function, since Keil only documents that a function may not do
that but doesn&amp;#39;t document what failure you will get.&lt;/p&gt;

&lt;p&gt;
In your case, it&amp;#39;s enough to know that your code isn&amp;#39;t fulfilling
the requirements - so either add a loop or have the thread kill
itself.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multitasking problem</title><link>https://community.arm.com/thread/82248?ContentTypeID=1</link><pubDate>Thu, 13 Nov 2014 20:42:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ac1fd7de-0c64-4cb6-95bd-b7a8e035c95d</guid><dc:creator>Revathi</dc:creator><description>&lt;p&gt;&lt;p&gt;
i am sorry for that wrong naming. my doubt is that, is it the case
that if a while loop is missed then the next task will starts
executing in the previous task&amp;#39;s stack space.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: multitasking problem</title><link>https://community.arm.com/thread/68953?ContentTypeID=1</link><pubDate>Wed, 12 Nov 2014 00:32:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7f73ec46-bed3-4bb8-bd3a-f6d4474f9cd1</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Any reason you don&amp;#39;t match the naming of the tasks in your text
with the names actually used in the source code?&lt;/p&gt;

&lt;p&gt;
Anyway - the RTOS also has an idle task that will run when none of
your own tasks are ready to run.&lt;/p&gt;

&lt;p&gt;
And, according to specification &amp;quot;All tasks must be implemented as
endless loops. A task must never return.&amp;quot;&lt;br /&gt;
&lt;a href="http://www.keil.com/support/man/docs/rlarm/rlarm_ar_task_def.htm"&gt;http://www.keil.com/support/man/docs/rlarm/rlarm_ar_task_def.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
So your program is invalid, because it isn&amp;#39;t fulfilling all
documented requirements.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>