<div dir="ltr">Sorry either I lack knowledge in C or lack knowledge in working with rtems. Do you mean if rtems smp is defined then we make sure that scheduler context base type is defined? I don't quite understand why it would be !defined? And the changes you're referring to are not in the scheduler.h file which is where the struct is defined. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 30 Oct 2023 at 03:04, Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 29.10.23 02:44, zack leung wrote:<br>
> ./../../cpukit/include/rtems/score/schedulerpriority.h:87:21: error: <br>
> field 'Base' has incomplete type<br>
> 87 | Scheduler_Context Base;<br>
> | ^~~~<br>
> ../../../cpukit/include/rtems/score/schedulersimple.h:89:21: error: <br>
> field 'Base' has incomplete type<br>
> 89 | Scheduler_Context Base;<br>
> | ^~~~<br>
> <br>
> I get this error when using typedefs<br>
<br>
Yes, the<br>
<br>
typedef struct Scheduler_Context Scheduler_Context;<br>
<br>
only creates the typedef and the structure name. This is why I also wrote:<br>
<br>
Then you have to make sure that #if !defined(RTEMS_SMP) no objects of <br>
this type are used.<br>
<br>
For example:<br>
<br>
diff --git a/cpukit/include/rtems/score/schedulersimple.h <br>
b/cpukit/include/rtems/score/schedulersimple.h<br>
index d9acd3dea0..0db72b2a51 100644<br>
--- a/cpukit/include/rtems/score/schedulersimple.h<br>
+++ b/cpukit/include/rtems/score/schedulersimple.h<br>
@@ -83,10 +83,12 @@ extern "C" {<br>
* @brief Simple scheduler context.<br>
*/<br>
typedef struct {<br>
+#if !defined(RTEMS_SMP)<br>
/**<br>
* @brief Basic scheduler context.<br>
*/<br>
Scheduler_Context Base;<br>
+#endif<br>
<br>
/**<br>
* @brief One ready queue for all ready threads.<br>
<br>
-- <br>
embedded brains GmbH<br>
Herr Sebastian HUBER<br>
Dornierstr. 4<br>
82178 Puchheim<br>
Germany<br>
email: <a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a><br>
phone: +49-89-18 94 741 - 16<br>
fax: +49-89-18 94 741 - 08<br>
<br>
Registergericht: Amtsgericht München<br>
Registernummer: HRB 157899<br>
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler<br>
Unsere Datenschutzerklärung finden Sie hier:<br>
<a href="https://embedded-brains.de/datenschutzerklaerung/" rel="noreferrer" target="_blank">https://embedded-brains.de/datenschutzerklaerung/</a><br>
</blockquote></div>