Will task be deleted when it exit the main loop - VxWorks

This is a discussion on Will task be deleted when it exit the main loop - VxWorks ; Hi All, One thing I want to make clear is: When we exit from the loop function of main() of this task, we could not never see this task by running "i" in the shell. So, does this mean it ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Will task be deleted when it exit the main loop

  1. Will task be deleted when it exit the main loop

    Hi All,
    One thing I want to make clear is:
    When we exit from the loop function of main() of this task, we could
    not never see this task by running "i" in the shell. So, does this mean
    it was automatically deleted.
    If the answer is yes, how doe this happen?

    Thanks!


  2. Re: Will task be deleted when it exit the main loop

    Yes, in vxWorks you spawn a new task by specifying an entry-function for
    that task (eg. your main()). When this function returns, then the task is
    deleted and the stack of that task is freed.

    This is a nice feature of vxWorks :-) But anyway, it would make no sense,
    to let a task live, which entry-function returned. What should that task do?
    You could not "reactivate" it anyway...

    Thomas


    "jeanwelly" schrieb im Newsbeitrag
    news:1148653392.270386.72020@j33g2000cwa.googlegro ups.com...
    > Hi All,
    > One thing I want to make clear is:
    > When we exit from the loop function of main() of this task, we could
    > not never see this task by running "i" in the shell. So, does this mean
    > it was automatically deleted.
    > If the answer is yes, how doe this happen?
    >
    > Thanks!
    >




  3. Re: Will task be deleted when it exit the main loop

    Thanks Thomas!

    I would follow the former question:
    I just check the main function of my task, and found a return value
    with 0 is returned, so my question is "How does the kernel detect the
    return value and delete the task?". I can't find that pieces of codes
    in the kernel, could you show me the file name and the function name?
    Thank you!


+ Reply to Thread