[PATCH] fixed warning related to spstdc17

zack leung zakthertemsdev at gmail.com
Fri Oct 27 01:43:34 UTC 2023


ping

On Tue, 24 Oct 2023 at 22:17, zack leung <zakthertemsdev at gmail.com> wrote:

> that didn't work but i'm thinking of defining a char array that is  equal
> to the size of the processor lock and the isr lock? i figured  that the
> processor lock is 64 bits and isr lock is a one bit?
> I'm confused on how to make an api define do you have a file i can look
> at?
>
>
>
> On Tue, 24 Oct 2023 at 08:31, Sebastian Huber <
> sebastian.huber at embedded-brains.de> wrote:
>
>> 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/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20231026/d031ca5b/attachment.htm>


More information about the devel mailing list