Search code examples
vxworks

Setting name of initial task in a vxworks RTP


When you spawn a new vxworks task using taskSpawn, you get to set the task name:

char name[16] = "tFooBar";    
taskSpawn(name, 100, VX_FP_TASK,STACK_SIZE,  foo, 0,0,0,0,0,0,0,0);

You can do this both to spawn a new task within the kernel or within an RTP. What I cant figure out is how to set the task name of the initial RTP task, which appears to always be allocated iMyRtp (assuming the RTP is MyRtp.vxe).

I cant believe this isn't possible, so what am I missing?


Solution

  • One option is to just spawn a new, named, task immediately on entry to the RTP, and perform the work in this task.

    The Initial task should then be exited using taskExit() to ensure that the RTP is not removed.