<div dir="ltr"><div><div><div><span style="color:rgb(116,27,71)"><span class="gmail-im">Could you please change the<br>
<br>
struct _Thread_Control<br>
<br>
to<br>
<br>
Thread_Control<br>
<br>
and check if it still works.<br>
<br>
In RTEMS, we use typedefs for structures in general.</span><br></span><br></div>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:<br><br><i>typedef struct _Thread_Control Thread_Control;</i> <br><br></div>However this leads to the following error:<br><br><i>fileio-wrapper.c:389:31: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]<br> struct Thread_Control* tc = _Thread_Get_executing();<br> ^~~~~~~~~~~~~~~~~~~~~<br>fileio-wrapper.c:390:32: warning: passing argument 1 of '_Thread_Get_priority' from incompatible pointer type [-Wincompatible-pointer-types]<br> return (_Thread_Get_priority(tc) << 8) | tc->Real_priority.priority;<br><br></i></div>I had tried this earlier too. So it doesn't work.<br><div><i></i><div><br><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 30, 2018 at 10:59 AM, Sebastian Huber <span dir="ltr"><<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 29/05/18 17:36, Vidushi Vashishth wrote:<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
linkers/rtld-trace-buffer.ini | 5 +++--<br>
1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/linkers/<a href="http://rtld-trace-buffer.in">rtld-trace-buffer.in</a><wbr>i b/linkers/<a href="http://rtld-trace-buffer.in">rtld-trace-buffer.in</a><wbr>i<br>
index af9fc31..ee68d55 100644<br>
--- a/linkers/<a href="http://rtld-trace-buffer.in">rtld-trace-buffer.in</a><wbr>i<br>
+++ b/linkers/<a href="http://rtld-trace-buffer.in">rtld-trace-buffer.in</a><wbr>i<br>
@@ -26,6 +26,7 @@ buffer-local = " uint8_t* in;"<br>
header = "#include <stdint.h>"<br>
header = "#include <rtems.h>"<br>
header = "#include <rtems/rtems/tasksimpl.h>"<br>
+header = "#include <rtems/score/threadimpl.h>"<br>
[trace-buffer-tracers]<br>
code = <<<CODE<br>
@@ -84,8 +85,8 @@ static inline uint32_t __rtld_tbg_executing_id(void)<br>
static inline uint32_t __rtld_tbg_executing_status(vo<wbr>id)<br>
{<br>
/* @fixme Add the current CPU for SMP. */<br>
- struct Thread_Control* tc = _Thread_Get_executing();<br>
</blockquote>
<br></span><span class="">
Could you please change the<br>
<br>
struct _Thread_Control<br>
<br>
to<br>
<br>
Thread_Control<br>
<br>
and check if it still works.<br>
<br>
In RTEMS, we use typedefs for structures in general.<br>
<br>
</span><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- return (tc->current_priority << 8) | tc->real_priority;<br>
+ struct _Thread_Control* tc = _Thread_Get_executing();<br>
+ return (_Thread_Get_priority(tc) << 8) | tc->Real_priority.priority;<br>
}<br>
static inline uint32_t __rtld_tbg_executing_state(voi<wbr>d)<br>
</blockquote>
<br>
-- <br></span><span class="">
Sebastian Huber, embedded brains GmbH<br>
<br>
Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
Phone : +49 89 189 47 41-16<br>
Fax : +49 89 189 47 41-09<br>
E-Mail : <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brain<wbr>s.de</a><br>
PGP : Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
<br></span>
______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a></blockquote></div><br></div>