[PATCH] fixed warning related to spstdc17

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Oct 24 12:31:12 UTC 2023


On 24.10.23 14:02, zack leung wrote:
> hi! sabestian did you mean the size of the structure?

Yes, one option to get rid of the empty structures is to just provide 
typedefs, for example:

#if defined(RTEMS_SMP)
typedef struct Scheduler_Context {
    ...
} Scheduler_Context;
#else
typedef struct Scheduler_Context Scheduler_Context;
#endif

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

For the ISR locks we can do something similar. However, in this case 
this affects also the API, so we probably need an API define for this as 
well.  Suggestion: RTEMS_HAVE_INTERRUPT_LOCK_OBJECTS.

The user can then do something like this:

struct app {
   ...
#if defined(RTEMS_HAVE_INTERRUPT_LOCK_OBJECTS)
   rtems_interrupt_lock lock;
#endif
   ...
}

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at 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/


More information about the devel mailing list