<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic _task_create() returns null in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275579#M8515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Device: mcf52258&lt;/P&gt;&lt;P&gt;MQX version: 3.8.1&lt;/P&gt;&lt;P&gt;Compilier: CW Eclipse 10.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My application has 15 tasks.&amp;nbsp; For about a year all the tasks have been getting created without any issues that I can observe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For no reason that I can see, the last task to be created is returning 0 when _task_create() is called.&amp;nbsp; I verified thread priorities, and there are no duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do to determine why the last task is not getting created?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Vince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Apr 2013 17:53:32 GMT</pubDate>
    <dc:creator>VinceTF</dc:creator>
    <dc:date>2013-04-18T17:53:32Z</dc:date>
    <item>
      <title>_task_create() returns null</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275579#M8515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Device: mcf52258&lt;/P&gt;&lt;P&gt;MQX version: 3.8.1&lt;/P&gt;&lt;P&gt;Compilier: CW Eclipse 10.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My application has 15 tasks.&amp;nbsp; For about a year all the tasks have been getting created without any issues that I can observe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For no reason that I can see, the last task to be created is returning 0 when _task_create() is called.&amp;nbsp; I verified thread priorities, and there are no duplicates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do to determine why the last task is not getting created?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Vince&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Apr 2013 17:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275579#M8515</guid>
      <dc:creator>VinceTF</dc:creator>
      <dc:date>2013-04-18T17:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: _task_create() returns null</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275580#M8516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Vincent Gagliardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please look at the code in mqx/source/kernel/task.c where it's _task_create_internal function. This one is invoked inside _task_create.&lt;/P&gt;&lt;P&gt;You'll see all possible returns with MQX_NULL_TASK_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Snippet from MQX reference manual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Traits&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;• If the child is on another processor, blocks the creator until the child is created&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;• On failure, calls _task_set_error() to set the task error code (see task error codes)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;• For _task_create():&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;— If the child is on the same processor, preempts the creator if the child is a higher priority&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have you checked task error code ? Once you solve your problem, share it with the community. ThX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;c0170&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 06:51:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275580#M8516</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2013-04-19T06:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: _task_create() returns null</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275581#M8517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you doesn't have enough stack for creating tasks. Try to check TAD (task aware debugging) in cw10.2 IDE or try to made stacks of your tasks smaller.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 07:47:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275581#M8517</guid>
      <dc:creator>BielikM</dc:creator>
      <dc:date>2013-04-19T07:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: _task_create() returns null</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275582#M8518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;_task_get_error() returned code 4 which is MQX_OUT_OF_MEMORY.&amp;nbsp; I reduced the size of the stack for the task that was returning the error and everything works now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to both of you for your quick response and your help.&amp;nbsp; I feel both of your responses are correct, but the forum only allows one to be selected as correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Apr 2013 18:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/task-create-returns-null/m-p/275582#M8518</guid>
      <dc:creator>VinceTF</dc:creator>
      <dc:date>2013-04-19T18:02:55Z</dc:date>
    </item>
  </channel>
</rss>

