On 29.10.23 02:44, zack leung wrote:
./../../cpukit/include/rtems/score/schedulerpriority.h:87:21: error: field 'Base' has incomplete type
    87 |   Scheduler_Context Base;
       |                     ^~~~
../../../cpukit/include/rtems/score/schedulersimple.h:89:21: error: field 'Base' has incomplete type
    89 |   Scheduler_Context Base;
       |                     ^~~~

I get this error when using typedefs

Yes, the

typedef struct Scheduler_Context Scheduler_Context;

only creates the typedef and the structure name. This is why I also wrote:

Then you have to make sure that #if !defined(RTEMS_SMP) no objects of this type are used.

For example:

diff --git a/cpukit/include/rtems/score/schedulersimple.h b/cpukit/include/rtems/score/schedulersimple.h
index d9acd3dea0..0db72b2a51 100644
--- a/cpukit/include/rtems/score/schedulersimple.h
+++ b/cpukit/include/rtems/score/schedulersimple.h
@@ -83,10 +83,12 @@ extern "C" {
  * @brief Simple scheduler context.
  */
 typedef struct {
+#if !defined(RTEMS_SMP)
   /**
    * @brief Basic scheduler context.
    */
   Scheduler_Context Base;
+#endif

   /**
    * @brief One ready queue for all ready threads.

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to