This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Task questions

Hi,  a few customer questions on tasks...

 

- Where does the stack space for a task originate?  From the system heap?  From the stack space of task that creates it?  From the heap of the task that creates it?

 

- What is the meaning of the entry "stackHeap" in the task_Params structure?

 

- Does the task function require that it's prototype accept two arguments?  We have a nominal task structure that accepts either one or no arguments.  We've implemented a wrapper function but would like to know if this is necessary.

 

Thanks,

Travis

  • tscheck said:

    Hi,  a few customer questions on tasks...

     

    - Where does the stack space for a task originate?  From the system heap?  From the stack space of task that creates it?  From the heap of the task that creates it?

    I assume you're asking about DSP/BIOS Tasks...

    A Task's stack space can come from many places since there is flexibility in how it can be specified.  You can supply a manually-allocated block, or let it allocate a stack for you.  You can let it allocate the stack from the default heap, or you can specify which heap.

    BTW, there is no concept of "heap of the task", heaps are system wide and don't belong to any particular resource.

    tscheck said:
    - What is the meaning of the entry "stackHeap" in the task_Params structure?

    If you don't supply a manually-allocated block, stackHeap would be the place that you specify the heap from which the stack is allocated.

    - Does the task function require that it's prototype accept two arguments?  We have a nominal task structure that accepts either one or no arguments.  We've implemented a wrapper function but would like to know if this is necessary.

    [/quote]

    The Task function will be passed two arguments.  It is up to you to decide what to do with those arguments, if anything.  For clean C compiling you would want to prototype your Task function with two arguments, but you can always play casting tricks.

    tscheck said:

     Thanks,
    Travis

    Regards,

    - Rob

    [quote user="tscheck"]