[PATCH] Updating trace buffer configuration

Vidushi Vashishth reachvidu at gmail.com
Wed May 30 13:03:55 UTC 2018


Could you please change the

struct _Thread_Control

to

Thread_Control

and check if it still works.

In RTEMS, we use typedefs for structures in general.

I tried to include the threadq.h header file so that I could use the
variable Thread_Control instead of _Thread_Control. This header file has
the following typedef statement:

*typedef struct _Thread_Control Thread_Control;*

However this leads to the following error:







*fileio-wrapper.c:389:31: warning: initialization from incompatible pointer
type [-Wincompatible-pointer-types]   struct Thread_Control* tc =
_Thread_Get_executing();
^~~~~~~~~~~~~~~~~~~~~fileio-wrapper.c:390:32: warning: passing argument 1
of '_Thread_Get_priority' from incompatible pointer type
[-Wincompatible-pointer-types]   return (_Thread_Get_priority(tc) << 8) |
tc->Real_priority.priority;*
I had tried this earlier too. So it doesn't work.



On Wed, May 30, 2018 at 10:59 AM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

>
>
> On 29/05/18 17:36, Vidushi Vashishth wrote:
>
>> ---
>>   linkers/rtld-trace-buffer.ini | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/linkers/rtld-trace-buffer.ini b/linkers/rtld-trace-buffer.in
>> i
>> index af9fc31..ee68d55 100644
>> --- a/linkers/rtld-trace-buffer.ini
>> +++ b/linkers/rtld-trace-buffer.ini
>> @@ -26,6 +26,7 @@ buffer-local = " uint8_t* in;"
>>   header = "#include <stdint.h>"
>>   header = "#include <rtems.h>"
>>   header = "#include <rtems/rtems/tasksimpl.h>"
>> +header = "#include <rtems/score/threadimpl.h>"
>>     [trace-buffer-tracers]
>>   code = <<<CODE
>> @@ -84,8 +85,8 @@ static inline uint32_t __rtld_tbg_executing_id(void)
>>   static inline uint32_t __rtld_tbg_executing_status(void)
>>   {
>>     /* @fixme Add the current CPU for SMP. */
>> -  struct Thread_Control* tc = _Thread_Get_executing();
>>
>
> Could you please change the
>
> struct _Thread_Control
>
> to
>
> Thread_Control
>
> and check if it still works.
>
> In RTEMS, we use typedefs for structures in general.
>
> -  return (tc->current_priority << 8) | tc->real_priority;
>> +  struct _Thread_Control* tc = _Thread_Get_executing();
>> +  return (_Thread_Get_priority(tc) << 8) | tc->Real_priority.priority;
>>   }
>>     static inline uint32_t __rtld_tbg_executing_state(void)
>>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180530/8c0c39ab/attachment-0002.html>


More information about the devel mailing list