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 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel