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
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.