<div dir="ltr"><div>./../../cpukit/include/rtems/score/schedulerpriority.h:87:21: error: field 'Base' has incomplete type<br> 87 | Scheduler_Context Base;<br> | ^~~~<br>../../../cpukit/include/rtems/score/schedulersimple.h:89:21: error: field 'Base' has incomplete type<br> 89 | Scheduler_Context Base;<br></div><div> | ^~~~</div><div><br></div><div>I get this error when using typedefs <br></div><div><br></div><div><br></div><div><br></div><div>#if defined(RTEMS_SMP)<br>typedef struct Scheduler_Context {<br> <br> <br><br> /**<br> * @brief Lock to protect this scheduler instance.<br> */<br> ISR_lock_Control Lock;<br><br> /**<br> * @brief The set of processors owned by this scheduler instance.<br> */<br> Processor_mask Processors;<br><br>} Scheduler_Context;<br>#endif<br>#if !defined(RTEMS_SMP)<br> typedef struct Scheduler_Context Scheduler_Context;<br>#endif<br>/**</div><div><br></div><div>or <br></div><div><br></div><div>#if defined(RTEMS_SMP)<br>typedef struct Scheduler_Context {<br> <br> <br><br> /**<br> * @brief Lock to protect this scheduler instance.<br> */<br> ISR_lock_Control Lock;<br><br> /**<br> * @brief The set of processors owned by this scheduler instance.<br> */<br> Processor_mask Processors;<br><br>} Scheduler_Context;<br></div><div>#else<br></div><div> typedef struct Scheduler_Context Scheduler_Context;<br>#endif<br>/**</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 27 Oct 2023 at 01:40, 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"><br>
<br>
On 27.10.23 03:43, zack leung wrote:<br>
> ping<br>
> <br>
> On Tue, 24 Oct 2023 at 22:17, zack leung <<a href="mailto:zakthertemsdev@gmail.com" target="_blank">zakthertemsdev@gmail.com</a> <br>
> <mailto:<a href="mailto:zakthertemsdev@gmail.com" target="_blank">zakthertemsdev@gmail.com</a>>> wrote:<br>
> <br>
> that didn't work but i'm thinking of defining a char array that is <br>
> equal to the size of the processor lock and the isr lock? <br>
<br>
This is a bit complicated and still leads to a size increase.<br>
<br>
> i figured <br>
> that the processor lock is 64 bits and isr lock is a one bit?<br>
> I'm confused on how to make an api define do you have a file i can<br>
> look at?<br>
<br>
Maybe you try to fix the Scheduler_Context warning first. It is easier <br>
to fix. I am pretty sure that this approach works:<br>
<br>
Get rid of the empty structures is to just provide typedefs, for example:<br>
<br>
#if defined(RTEMS_SMP)<br>
typedef struct Scheduler_Context {<br>
...<br>
} Scheduler_Context;<br>
#else<br>
typedef struct Scheduler_Context Scheduler_Context;<br>
#endif<br>
<br>
Then you have to make sure that #if !defined(RTEMS_SMP) no objects of <br>
this type are used.<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>