[PATCH] Add a user argument to 'rtems_iterate_over_all_threads'.
Chris Johns
chrisj at rtems.org
Wed Jul 13 09:52:29 UTC 2016
On 13/07/2016 6:36 PM, Sebastian Huber wrote:
> I think it is very bad that <rtems.h> exposes Thread_Control via
> rtems_tcb directly. It is also bad that the user extensions directly use
> tcb->extensions[index] to get their data. It would be better to have an
> accessor function and hide the data structure. Maybe we should just add
> a forward declaration to <rtems.h>
>
> typedef struct _Thread_Control rtems_tcb;
>
> and provide a global accessor for the extensions data, e.g.
>
> void *rtems_extensions_get_data(rtems_id extension_id, rtems_tcb *tcb);
>
> Then remove the Thread_Control visibility from <rtems.h>. User that
> really need the internals must include <rtems/score/thread.h>.
Yes, these are all good points and we should fix this interface. If we
provide accessor type functions we could also provide an RTEMS API level
struct of that data and provide a way to snapshot the tasks.
I will take this away and come back with something. I need a suitable
interface for something I am working on.
Chris
More information about the devel
mailing list