This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX - Task list

Hello,

Does anyone know of anyway to get a list of all 'registered' (i.e. created) tasks in RTX?
I mean in code during runtime, of course.

(Note: I think it must be possible since uVision does it?)

Thanks in advance.

M

Parents
  • I'm not sure I understand your attitude Hans - I'm not attacking you I'm simply looking for advice/help.

    If you feel the need to be rude and condescending, please don't bother responding to any of my posts.

    I also don't need any of the other context data I was simply pointing out that the data uVision knows about the various tasks (other than the string name) is most probably known by the RTOS.

    My question is and has always been simple. I need a list of all "registered" tasks. I never said anything about strings or task names or anything so I do not see why a list of task ids is any less of a list.

    The reason is equally simple I want to associate my own custom data with each task but I want this association to be transparent to the all the tasks.

    For example I'm thinking of simply using a collection with the task id as the key. When a running tasks calls one of my functions I will check my collection for the task id (os_tsk_self) and if it is not in the collection I will create a new 'object'.

    I'm also using a fairly similar concept for a watchdog for each task.

    Anyway, I never understood the point of people getting chippy on an internet forum. I don't know you and you don't know me.

Reply
  • I'm not sure I understand your attitude Hans - I'm not attacking you I'm simply looking for advice/help.

    If you feel the need to be rude and condescending, please don't bother responding to any of my posts.

    I also don't need any of the other context data I was simply pointing out that the data uVision knows about the various tasks (other than the string name) is most probably known by the RTOS.

    My question is and has always been simple. I need a list of all "registered" tasks. I never said anything about strings or task names or anything so I do not see why a list of task ids is any less of a list.

    The reason is equally simple I want to associate my own custom data with each task but I want this association to be transparent to the all the tasks.

    For example I'm thinking of simply using a collection with the task id as the key. When a running tasks calls one of my functions I will check my collection for the task id (os_tsk_self) and if it is not in the collection I will create a new 'object'.

    I'm also using a fairly similar concept for a watchdog for each task.

    Anyway, I never understood the point of people getting chippy on an internet forum. I don't know you and you don't know me.

Children
  • My question is and has always been simple. I need a list of all "registered" tasks.

    That question is evidently not simple. You're actually making it near-impossibly hard by being excessively vague about what it is you actually mean by a "list of tasks". So far, you've essentially only told people what you did not mean by it.

    At run time, task IDs are numbers --- no more, no less. Each task has a different one, and they're bound to be used as array indices already, i.e. they'll be starting at either 0 or 1, and grow sequentially. And that's all you need to know to use them. Yes, that's including the use case you outlined.

    Or to turn this around: how come you need such a list made by the software at run time, given that it's your own code that set it up at build time? I.e. you registered all those tasks with the RTOS. How come you need RTOS to tell you which those were?

  • Do you realize how you come off?

    That question is evidently not simple.

    Yes it is. Everyone else understood just fine. The answer may not be simple but the question is.

    You're actually making it near-impossibly hard by being excessively vague about what it is you actually mean by a "list of tasks".

    Nothing vague about a list of task IDs.

    I.e. you registered all those tasks with the RTOS. How come you need RTOS to tell you which those were?

    No I don't. Maybe you work on small projects with one developer or one company but this claim is not correct in my case.

    Please read my entire posts properly next time:
    If you feel the need to be rude and condescending, please don't bother responding to any of my posts.

  • how come you need such a list made by the software at run time, given that it's your own code that set it up at build time

    Not necessarily. The OP might be confronted with a situation in which RTX is spawned by a library. And besides, tasks can be created on the fly, at run time - and terminate or not depending on their own logic.